summaryrefslogtreecommitdiff
path: root/packages/ixp4xx/ixp-osal-2.1/2.6.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/ixp4xx/ixp-osal-2.1/2.6.patch')
-rw-r--r--packages/ixp4xx/ixp-osal-2.1/2.6.patch137
1 files changed, 137 insertions, 0 deletions
diff --git a/packages/ixp4xx/ixp-osal-2.1/2.6.patch b/packages/ixp4xx/ixp-osal-2.1/2.6.patch
new file mode 100644
index 0000000000..6bf1c2c32d
--- /dev/null
+++ b/packages/ixp4xx/ixp-osal-2.1/2.6.patch
@@ -0,0 +1,137 @@
+--- ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c 2005-08-24 00:16:37.000000000 +0200
++++ ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c 2005-08-24 00:18:02.000000000 +0200
+@@ -45,9 +45,9 @@
+ * -- End Intel Copyright Notice --
+ */
+ #include <linux/linkage.h>
++#include <linux/spinlock.h>
+ #include <linux/ipc.h>
+ #include <linux/msg.h>
+-#include <linux/spinlock.h>
+ #include <linux/interrupt.h>
+
+ #include "IxOsal.h"
+--- ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c 2005-08-24 00:16:37.000000000 +0200
++++ ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c 2005-08-26 15:58:16.000000000 +0200
+@@ -46,7 +46,7 @@
+ */
+
+ #include <linux/slab.h>
+-#include <asm-arm/hardirq.h>
++#include <linux/hardirq.h>
+ #include "IxOsal.h"
+
+ /* Define a large number */
+@@ -93,7 +93,7 @@
+ {
+
+ IX_STATUS ixStatus = IX_SUCCESS;
+- UINT32 timeoutTime;
++ unsigned long timeoutTime;
+
+ if (sid == NULL)
+ {
+@@ -261,7 +261,7 @@ ixOsalMutexInit (IxOsalMutex * mutex)
+ PUBLIC IX_STATUS
+ ixOsalMutexLock (IxOsalMutex * mutex, INT32 timeout)
+ {
+- UINT32 timeoutTime;
++ unsigned long timeoutTime;
+
+ if (in_irq ())
+ {
+--- ixp_osal/os/linux/src/core/IxOsalOsServices.c 2005-04-17 20:56:28.000000000 -0700
++++ ixp_osal/os/linux/src/core/IxOsalOsServices.c 2005-10-01 16:37:00.876444607 -0700
+@@ -54,6 +54,7 @@
+ #include <linux/time.h>
+ #include <linux/sched.h>
+ #include <linux/slab.h>
++#include <linux/interrupt.h>
+
+ #include "IxOsal.h"
+
+@@ -89,7 +90,7 @@
+ /*
+ * General interrupt handler
+ */
+-static void
++static irqreturn_t
+ ixOsalOsIsrProxy (int irq, void *dev_id, struct pt_regs *regs)
+ {
+ IxOsalInfoType *isr_proxy_info = (IxOsalInfoType *) dev_id;
+@@ -98,6 +99,7 @@
+ "ixOsalOsIsrProxy: Interrupt used before ixOsalIrqBind was invoked");
+
+ isr_proxy_info->routine (isr_proxy_info->parameter);
++ return IRQ_HANDLED;
+ }
+
+ /*
+@@ -105,11 +107,12 @@
+ * This handler saves the interrupted Program Counter (PC)
+ * into a global variable
+ */
+-static void
++static irqreturn_t
+ ixOsalOsIsrProxyWithPC (int irq, void *dev_id, struct pt_regs *regs)
+ {
+ ixOsalLinuxInterruptedPc = regs->ARM_pc;
+ ixOsalOsIsrProxy(irq, dev_id, regs);
++ return IRQ_HANDLED;
+ }
+
+ /**************************************
+@@ -191,10 +194,15 @@
+ PUBLIC UINT32
+ ixOsalIrqLock ()
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++ unsigned long flags;
++ local_irq_save(flags);
++#else
+ UINT32 flags;
+ save_flags (flags);
+ cli ();
+- return flags;
++#endif
++ return (UINT32)flags;
+ }
+
+ /* Enable interrupts and task scheduling,
+@@ -204,7 +212,11 @@
+ PUBLIC void
+ ixOsalIrqUnlock (UINT32 lockKey)
+ {
++# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++ local_irq_restore((unsigned long)lockKey);
++# else
+ restore_flags (lockKey);
++# endif
+ }
+
+ PUBLIC UINT32
+@@ -329,7 +341,7 @@
+ PUBLIC void
+ ixOsalSleep (UINT32 milliseconds)
+ {
+- if (milliseconds != 0)
++ if (milliseconds*HZ >= 1000)
+ {
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout ((milliseconds * HZ) / 1000);
+--- ixp_osal/os/linux/src/core/IxOsalOsThread.c 2005-11-20 00:59:09.734097888 -0800
++++ ixp_osal/os/linux/src/core/IxOsalOsThread.c 2005-11-20 01:00:07.057705036 -0800
+@@ -65,12 +65,7 @@ thread_internal (void *unused)
+ void *arg = IxOsalOsThreadData.arg;
+ static int seq = 0;
+
+- daemonize ();
+- reparent_to_init ();
+-
+- exit_files (current);
+-
+- snprintf(current->comm, sizeof(current->comm), "IxOsal %d", ++seq);
++ daemonize ("IxOsal %d", ++seq);
+
+ up (&IxOsalThreadMutex);
+