summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-12-07 23:11:19 +0000
committerMike Frysinger <vapier@gentoo.org>2005-12-07 23:11:19 +0000
commit0a1347cde2f16c0e50306e5ac40a261c085e3b01 (patch)
tree602e0d493e1a3991decfa49a1966226328b0fd7f /net-misc/ixp4xx
parentadd some basic sanity checks (diff)
downloadgentoo-2-0a1347cde2f16c0e50306e5ac40a261c085e3b01.tar.gz
gentoo-2-0a1347cde2f16c0e50306e5ac40a261c085e3b01.tar.bz2
gentoo-2-0a1347cde2f16c0e50306e5ac40a261c085e3b01.zip
initial import
(Portage version: 2.0.53)
Diffstat (limited to 'net-misc/ixp4xx')
-rw-r--r--net-misc/ixp4xx/ChangeLog8
-rw-r--r--net-misc/ixp4xx/files/2.1/10-oe-ixethdb-header.patch11
-rw-r--r--net-misc/ixp4xx/files/2.1/11-oe-bit-macro.patch14
-rw-r--r--net-misc/ixp4xx/files/2.1/12-oe-ixnpemhconfigisr-is-private.patch18
-rw-r--r--net-misc/ixp4xx/files/2.1/13-oe-le.patch13
-rw-r--r--net-misc/ixp4xx/files/2.1/30-oe-Makefile.patch26
-rw-r--r--net-misc/ixp4xx/files/2.1/31-oe-2.6.patch137
-rw-r--r--net-misc/ixp4xx/files/2.1/32-oe-invalidate-cache.patch110
-rw-r--r--net-misc/ixp4xx/files/2.1/33-oe-ixp4xx-header.patch103
-rw-r--r--net-misc/ixp4xx/files/2.1/34-oe-le.patch65
-rw-r--r--net-misc/ixp4xx/files/2.1/35-oe-assert.patch37
-rw-r--r--net-misc/ixp4xx/files/2.1/40-yvasilev-oslinux.patch20
-rw-r--r--net-misc/ixp4xx/files/2.1/41-oemod-Makefile.patch55
-rw-r--r--net-misc/ixp4xx/files/2.1/42-yvasilev-Makefile-ixp400.patch13
-rw-r--r--net-misc/ixp4xx/files/2.1/43-yvasilev-Makefile-ixp400_eth.patch35
-rw-r--r--net-misc/ixp4xx/files/2.1/50-oemod-ixp400_eth.patch171
-rw-r--r--net-misc/ixp4xx/files/2.1/README1
-rw-r--r--net-misc/ixp4xx/files/digest-ixp4xx-2.13
-rw-r--r--net-misc/ixp4xx/ixp4xx-2.1.ebuild51
-rw-r--r--net-misc/ixp4xx/metadata.xml6
20 files changed, 897 insertions, 0 deletions
diff --git a/net-misc/ixp4xx/ChangeLog b/net-misc/ixp4xx/ChangeLog
new file mode 100644
index 000000000000..feef4afd62ee
--- /dev/null
+++ b/net-misc/ixp4xx/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for net-misc/ixp4xx-2.1
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ixp4xx/ChangeLog,v 1.1 2005/12/07 23:10:06 vapier Exp $
+
+*ixp4xx-2.1 (07 Dec 2005)
+
+ 07 Dec 2005; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Yuri Vasilevski.
diff --git a/net-misc/ixp4xx/files/2.1/10-oe-ixethdb-header.patch b/net-misc/ixp4xx/files/2.1/10-oe-ixethdb-header.patch
new file mode 100644
index 000000000000..0b3702a3e101
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/10-oe-ixethdb-header.patch
@@ -0,0 +1,11 @@
+--- ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h
++++ ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h
+@@ -693,7 +693,7 @@ IX_ETH_DB_PUBLIC UINT32 ixEthDBEntryXORH
+ IX_ETH_DB_PUBLIC UINT32 ixEthDBKeyXORHash(void *macAddress);
+
+ /* Port updates */
+-IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBFeature type);
++IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBRecordType type);
+ IX_ETH_DB_PUBLIC void ixEthDBUpdatePortLearningTrees(IxEthDBPortMap triggerPorts);
+ IX_ETH_DB_PUBLIC void ixEthDBNPEAccessRequest(IxEthDBPortId portID);
+ IX_ETH_DB_PUBLIC void ixEthDBUpdateLock(void);
diff --git a/net-misc/ixp4xx/files/2.1/11-oe-bit-macro.patch b/net-misc/ixp4xx/files/2.1/11-oe-bit-macro.patch
new file mode 100644
index 000000000000..40cc8d87d9b5
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/11-oe-bit-macro.patch
@@ -0,0 +1,14 @@
+--- ixp400_xscale_sw/src/include/IxTypes.h
++++ ixp400_xscale_sw/src/include/IxTypes.h
+@@ -79,6 +79,10 @@
+ #endif
+ #endif
+
++#ifndef BIT
++#define BIT(x) ((1)<<(x))
++#endif
++
+ #include "IxOsalBackward.h"
+
+ #endif /* IxTypes_H */
+
diff --git a/net-misc/ixp4xx/files/2.1/12-oe-ixnpemhconfigisr-is-private.patch b/net-misc/ixp4xx/files/2.1/12-oe-ixnpemhconfigisr-is-private.patch
new file mode 100644
index 000000000000..3b1848fb67d9
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/12-oe-ixnpemhconfigisr-is-private.patch
@@ -0,0 +1,18 @@
+--- ixp400_xscale_sw/src/npeMh/IxNpeMhSymbols.c
++++ ixp400_xscale_sw/src/npeMh/IxNpeMhSymbols.c
+@@ -63,7 +63,6 @@ EXPORT_SYMBOL(ixNpeMhMessagesReceive);
+ EXPORT_SYMBOL(ixNpeMhShow);
+ EXPORT_SYMBOL(ixNpeMhShowReset);
+
+-extern void ixNpeMhConfigIsr (void *parameter);
+ extern BOOL ixNpeMhConfigInFifoIsFull(IxNpeMhNpeId npeId);
+ extern BOOL ixNpeMhConfigOutFifoIsEmpty (IxNpeMhNpeId npeId);
+ extern void ixNpeMhConfigLockRelease (IxNpeMhNpeId npeId);
+@@ -72,7 +71,6 @@ extern void ixNpeMhConfigOutFifoRead (Ix
+ extern void ixNpeMhConfigInFifoWrite (IxNpeMhNpeId npeId,IxNpeMhMessage message);
+ extern struct ixNpeMhConfigNpeInfo ixNpeMhConfigNpeInfo[IX_NPEMH_NUM_NPES];
+
+-EXPORT_SYMBOL(ixNpeMhConfigIsr);
+ EXPORT_SYMBOL(ixNpeMhConfigInFifoIsFull);
+ EXPORT_SYMBOL(ixNpeMhConfigOutFifoIsEmpty);
+ EXPORT_SYMBOL(ixNpeMhConfigLockRelease);
diff --git a/net-misc/ixp4xx/files/2.1/13-oe-le.patch b/net-misc/ixp4xx/files/2.1/13-oe-le.patch
new file mode 100644
index 000000000000..0a52db5e060b
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/13-oe-le.patch
@@ -0,0 +1,13 @@
+--- ixp400_xscale_sw/src/include/IxQMgr.h
++++ ixp400_xscale_sw/src/include/IxQMgr.h
+@@ -96,8 +98,8 @@
+
+ #else
+
+-#define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_DC
+-#define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_DC
++#define IX_QMGR_INLINE_READ_LONG IX_OSAL_READ_LONG_LE_AC
++#define IX_QMGR_INLINE_WRITE_LONG IX_OSAL_WRITE_LONG_LE_AC
+
+ #endif
+
diff --git a/net-misc/ixp4xx/files/2.1/30-oe-Makefile.patch b/net-misc/ixp4xx/files/2.1/30-oe-Makefile.patch
new file mode 100644
index 000000000000..8332b4daeaa3
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/30-oe-Makefile.patch
@@ -0,0 +1,26 @@
+--- ixp_osal/Makefile
++++ ixp_osal/Makefile
+@@ -185,7 +185,7 @@ endif
+ INCLUDE_DIRS = include $(OSAL_DIRS:%=$(MAIN_INC_PREFIX)/%) $(OSAL_DIRS:%=$(OS_INC_PREFIX)/%)
+
+ ifeq ($(IX_OSAL_MK_HOST_OS), linux)
+-INCLUDE_DIRS += $(LINUX_SRC)/include/asm-arm/arch-ixp425/
++INCLUDE_DIRS += $(LINUX_SRC)/include/asm-arm/arch-ixp4xx/
+ endif
+
+ CFLAGS += $(INCLUDE_DIRS:%=-I%)
+--- ixp_osal/os/linux/make/macros.mk
++++ ixp_osal/os/linux/make/macros.mk
+@@ -88,10 +88,10 @@ AR := $(LINUX_CROSS_COMPILE)ar
+ # Compiler & linker options
+
+ # Compiler flags
+-LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
++LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mtune=xscale
+
+ CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common \
+- -pipe -mapcs-32 -mshort-load-bytes -msoft-float -DMODULE \
++ -pipe -mapcs-32 -msoft-float -DMODULE \
+ -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS) -DEXPORT_SYMTAB
+
+ # Linux linker flags
diff --git a/net-misc/ixp4xx/files/2.1/31-oe-2.6.patch b/net-misc/ixp4xx/files/2.1/31-oe-2.6.patch
new file mode 100644
index 000000000000..edea920cb781
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/31-oe-2.6.patch
@@ -0,0 +1,137 @@
+--- ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c
++++ ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c
+@@ -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
++++ ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c
+@@ -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
++++ ixp_osal/os/linux/src/core/IxOsalOsServices.c
+@@ -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
++++ ixp_osal/os/linux/src/core/IxOsalOsThread.c
+@@ -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);
+
diff --git a/net-misc/ixp4xx/files/2.1/32-oe-invalidate-cache.patch b/net-misc/ixp4xx/files/2.1/32-oe-invalidate-cache.patch
new file mode 100644
index 000000000000..bb20ff026e8a
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/32-oe-invalidate-cache.patch
@@ -0,0 +1,110 @@
+--- ixp_osal/os/linux/include/core/IxOsalOs.h
++++ ixp_osal/os/linux/include/core/IxOsalOs.h
+@@ -56,6 +56,7 @@
+ #include <linux/cache.h>
+ #include <linux/mm.h>
+ #include <linux/config.h>
++#include <linux/version.h>
+ #include <asm/pgalloc.h>
+
+ /**
+@@ -66,9 +67,23 @@
+
+ #define IX_OSAL_OS_MMU_PHYS_TO_VIRT(addr) ((addr) ? phys_to_virt((unsigned int)(addr)) : 0)
+
+-#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size ))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++/*
++ * 2.6 kernels do not export the required cache functions.
++ */
++extern void ixOsalCacheInvalidateRange(unsigned long start, unsigned long size);
++extern void ixOsalCacheFlushRange(unsigned long start, unsigned long size);
++
++#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) \
++ixOsalCacheInvalidateRange((unsigned long)addr, (unsigned long)addr + size)
++#define IX_OSAL_OS_CACHE_FLUSH(addr, size) \
++ixOsalCacheFlushRange((unsigned long)addr, (unsigned long)addr + size )
+
++#else
++
++#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size ))
+ #define IX_OSAL_OS_CACHE_FLUSH(addr, size) ( clean_dcache_range((__u32)addr, (__u32)addr + size ))
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */
+
+ /* Cache preload not available*/
+ #define IX_OSAL_OS_CACHE_PRELOAD(addr,size) {}
+--- ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c
++++ ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c
+@@ -210,3 +210,59 @@ ixOsalCacheDmaFree (void *ptr)
+ free_pages ((unsigned int) memptr, order);
+ }
+ }
++
++
++/*
++ * 2.6 kernels do not export the required cache functions.
++ */
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++
++#define _IX_STR(x) #x
++#define IX_STR(x) _IX_STR(x)
++#define IX_CLM IX_STR(IX_OSAL_CACHE_LINE_SIZE-1)
++
++/*
++ * reimplementation of kernel's invalidate_dcache_range()
++ */
++void
++ixOsalCacheInvalidateRange(unsigned long start, unsigned long size)
++{
++ __asm__
++ (" tst %0, #" IX_CLM "\n"
++ " mcrne p15, 0, %0, c7, c10, 1 @ clean D cache line\n"
++ " bic %0, %0, #" IX_CLM "\n"
++ " tst %1, #" IX_CLM "\n"
++ " mcrne p15, 0, %1, c7, c10, 1 @ clean D cache line\n"
++ "1: mcr p15, 0, %0, c7, c6, 1 @ invalidate D cache line\n"
++ " add %0, %0, #" IX_STR(IX_OSAL_CACHE_LINE_SIZE) "\n"
++ " cmp %0, %1\n"
++ " blo 1b\n"
++ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n"
++ : /* no output */
++ : "r"(start), "r"(size)
++ : "cc");
++}
++
++/*
++ * reimplementation of kernel's invalidate_dcache_range()
++ */
++void
++ixOsalCacheFlushRange(unsigned long start, unsigned long size)
++{
++ __asm__
++ (" bic %0, %0, #" IX_CLM "\n"
++ "1: mcr p15, 0, %0, c7, c10, 1 @ clean D cache line\n"
++ " add %0, %0, #" IX_STR(IX_OSAL_CACHE_LINE_SIZE) "\n"
++ " cmp %0, %1\n"
++ " blo 1b\n"
++ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n"
++ : /* no output */
++ : "r"(start), "r"(size)
++ : "cc");
++}
++
++#undef _IX_STR
++#undef IX_STR
++#undef IX_CLM
++
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */
+--- ixp_osal/os/linux/src/core/IxOsalOsSymbols.c
++++ ixp_osal/os/linux/src/core/IxOsalOsSymbols.c
+@@ -64,6 +64,10 @@ EXPORT_SYMBOL (ixOsalMemSet);
+
+ EXPORT_SYMBOL (ixOsalCacheDmaMalloc);
+ EXPORT_SYMBOL (ixOsalCacheDmaFree);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++EXPORT_SYMBOL (ixOsalCacheInvalidateRange);
++EXPORT_SYMBOL (ixOsalCacheFlushRange);
++#endif
+
+ EXPORT_SYMBOL (ixOsalThreadCreate);
+ EXPORT_SYMBOL (ixOsalThreadStart);
diff --git a/net-misc/ixp4xx/files/2.1/33-oe-ixp4xx-header.patch b/net-misc/ixp4xx/files/2.1/33-oe-ixp4xx-header.patch
new file mode 100644
index 000000000000..3246bd2f45b5
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/33-oe-ixp4xx-header.patch
@@ -0,0 +1,103 @@
+--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Base.h
++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Base.h
+@@ -0,0 +1,72 @@
++/*
++ * Glue for the current linux definitons of this stuff.
++ */
++#ifndef IxOsalOsIxp425Base_H
++#define IxOsalOsIxp425Base_H 1
++#include <asm-arm/arch-ixp4xx/ixp4xx-regs.h>
++
++/* Force Address Coherent (the default) mapping on LE - Linux 2.6
++ * does not have a way of changing it.
++ */
++#if defined IX_OSAL_LINUX_LE
++# if !defined IX_OSAL_ENFORCED_LE_AC_MAPPING
++# define IX_OSAL_ENFORCED_LE_AC_MAPPING
++# endif
++# if defined IX_OSAL_LE_DC_MAPPING
++# error Little Endian Data Coherent mapping not supported on this platform
++# endif
++
++/* This doesn't matter on a BE build because it will never be used,
++ * however it will be selected and will fail on an LE build.
++ */
++# undef IX_OSAL_LE_DC
++# define IX_OSAL_LE_DC IX_OSAL_LE_DC_IS_INVALID_ON_THIS_PLATFORM
++#endif
++
++/* Physical addresses. */
++#define IXP425_PERIPHERAL_BASE_PHYS IXP4XX_PERIPHERAL_BASE_PHYS
++#define IXP425_EXP_CFG_BASE_PHYS IXP4XX_EXP_CFG_BASE_PHYS
++#define IXP425_PCI_CFG_BASE_PHYS IXP4XX_PCI_CFG_BASE_PHYS
++
++//#define IXP425_EXP_BUS_BASE1_PHYS
++#define IXP425_EXP_BUS_BASE2_PHYS IXP4XX_EXP_BUS_CS2_BASE_PHYS
++//#define IXP425_EXP_BUS_CS0_BASE_PHYS
++//#define IXP425_EXP_BUS_CS1_BASE_PHYS
++//#define IXP425_EXP_BUS_CS4_BASE_PHYS
++#define IXP425_EthA_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000)
++#define IXP425_EthB_BASE_PHYS (IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000)
++//#define IXP425_GPIO_BASE_PHYS
++#define IXP425_INTC_BASE_PHYS IXP4XX_INTC_BASE_PHYS
++//#define IXP425_NPEA_BASE_PHYS
++//#define IXP425_NPEB_BASE_PHYS
++//#define IXP425_NPEC_BASE_PHYS
++//#define IXP425_PMU_BASE_PHYS
++#define IXP425_QMGR_BASE_PHYS IXP4XX_QMGR_BASE_PHYS
++#define IXP425_TIMER_BASE_PHYS IXP4XX_TIMER_BASE_PHYS
++//#define IXP425_UART1_BASE_PHYS
++//#define IXP425_UART2_BASE_PHYS
++#define IXP425_USB_BASE_PHYS IXP4XX_USB_BASE_PHYS
++
++/* Virtual addresses. */
++#define IXP425_PERIPHERAL_BASE_VIRT IXP4XX_PERIPHERAL_BASE_VIRT
++#define IXP425_PERIPHERAL_REGION_SIZE IXP4XX_PERIPHERAL_REGION_SIZE
++#define IXP425_EXP_CFG_BASE_VIRT IXP4XX_EXP_CFG_BASE_VIRT
++#define IXP425_PCI_CFG_BASE_VIRT IXP4XX_PCI_CFG_BASE_VIRT
++
++//#define IXP425_EthA_BASE_VIRT
++//#define IXP425_EthB_BASE_VIRT
++//#define IXP425_GPIO_BASE_VIRT
++//#define IXP425_NPEA_BASE_VIRT
++//#define IXP425_NPEB_BASE_VIRT
++//#define IXP425_NPEC_BASE_VIRT
++//#define IXP425_QMGR_BASE_VIRT /* must be ioremapped on Linux 2.6 */
++//#define IXP425_TIMER_BASE_VIRT
++//#define IXP425_UART1_BASE_VIRT
++//#define IXP425_UART2_BASE_VIRT
++//#define IXP425_USB_BASE_VIRT
++
++/* Miscellaneous stuff. */
++#define IRQ_IXP425_XSCALE_PMU IRQ_IXP4XX_XSCALE_PMU
++#define IXP425_ICMR IXP4XX_ICMR
++#define IRQ_IXP425_USB IRQ_IXP4XX_USB
++#endif
+--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h
++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h
+@@ -53,6 +53,8 @@
+ #error "Error: IxOsalOsIxp425Sys.h cannot be included directly before IxOsalOsIxp400.h"
+ #endif
+
++#include "IxOsalOsIxp425Base.h"
++
+ /* Memory Base Address */
+ #define IX_OSAL_IXP400_EXP_BUS_PHYS_BASE IXP425_EXP_BUS_BASE2_PHYS
+ #define IX_OSAL_IXP400_EXP_BUS_BOOT_PHYS_BASE IXP425_EXP_BUS_BASE1_PHYS
+@@ -98,12 +100,12 @@ IxOsalMemoryMap ixOsalGlobalMemoryMap[]
+ * Queue Manager
+ */
+ {
+- IX_OSAL_STATIC_MAP, /* type */
++ IX_OSAL_DYNAMIC_MAP, /* type */
+ IX_OSAL_IXP400_QMGR_PHYS_BASE, /* physicalAddress */
+ IX_OSAL_IXP400_QMGR_MAP_SIZE, /* size */
+- IX_OSAL_IXP400_QMGR_VIRT_BASE, /* virtualAddress */
+- NULL, /* mapFunction */
+- NULL, /* unmapFunction */
++ 0, /* virtualAddress */
++ ixOsalLinuxMemMap, /* mapFunction */
++ ixOsalLinuxMemUnmap, /* unmapFunction */
+ 0, /* refCount */
+ IX_OSAL_BE | IX_OSAL_LE_DC, /* endianType */
+ "qMgr" /* name */
diff --git a/net-misc/ixp4xx/files/2.1/34-oe-le.patch b/net-misc/ixp4xx/files/2.1/34-oe-le.patch
new file mode 100644
index 000000000000..46af56ba24ab
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/34-oe-le.patch
@@ -0,0 +1,65 @@
+--- ixp_osal/include/modules/ioMem/IxOsalIoMem.h
++++ ixp_osal/include/modules/ioMem/IxOsalIoMem.h
+@@ -117,8 +117,8 @@ ixOsalCoreWordSwap (UINT32 wordIn)
+ #endif /* ndef __wince */
+
+ #define IX_OSAL_SWAP_SHORT(sData) ((sData >> 8) | ((sData & 0xFF) << 8))
+-#define IX_OSAL_SWAP_SHORT_ADDRESS(sAddr) ((sAddr) ^ 0x2)
+-#define IX_OSAL_SWAP_BYTE_ADDRESS(bAddr) ((bAddr) ^ 0x3)
++#define IX_OSAL_SWAP_SHORT_ADDRESS(sAddr) ((UINT16*)((UINT32)(sAddr) ^ 0x2))
++#define IX_OSAL_SWAP_BYTE_ADDRESS(bAddr) ((UINT8*)((UINT32)(bAddr) ^ 0x3))
+
+ #define IX_OSAL_BE_XSTOBUSL(wData) (wData)
+ #define IX_OSAL_BE_XSTOBUSS(sData) (sData)
+--- ixp_osal/include/modules/ioMem/IxOsalMemAccess.h
++++ ixp_osal/include/modules/ioMem/IxOsalMemAccess.h
+@@ -84,7 +84,7 @@
+
+ #elif defined (IX_OSAL_LINUX_LE)
+
+-#define IX_SDRAM_LE_DATA_COHERENT
++#define IX_SDRAM_LE_ADDRESS_COHERENT
+
+ #elif defined (IX_OSAL_WINCE_LE)
+
+--- ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h
++++ ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400CustomizedMapping.h
+@@ -171,7 +171,7 @@
+ ***************************/
+ #if (IX_COMPONENT_NAME == ix_qmgr)
+
+-#define IX_OSAL_LE_DC_MAPPING
++#define IX_OSAL_LE_AC_MAPPING
+
+ #endif /* qmgr */
+
+--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h
++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h
+@@ -107,7 +107,7 @@ IxOsalMemoryMap ixOsalGlobalMemoryMap[]
+ ixOsalLinuxMemMap, /* mapFunction */
+ ixOsalLinuxMemUnmap, /* unmapFunction */
+ 0, /* refCount */
+- IX_OSAL_BE | IX_OSAL_LE_DC, /* endianType */
++ IX_OSAL_BE | IX_OSAL_LE_AC, /* endianType */
+ "qMgr" /* name */
+ },
+
+--- ixp_osal/os/linux/src/modules/ioMem/IxOsalOsIoMem.c
++++ ixp_osal/os/linux/src/modules/ioMem/IxOsalOsIoMem.c
+@@ -45,6 +45,7 @@
+ * -- End Intel Copyright Notice --
+ */
+
++#include <asm/page.h>
+ #include <asm/io.h>
+ #include <linux/ioport.h>
+
+@@ -54,6 +55,8 @@
+ PUBLIC void
+ ixOsalLinuxMemMap (IxOsalMemoryMap * map)
+ {
++ /* Linux requires LE mappings to use address coherency */
++ IX_OSAL_ENSURE((map->mapEndianType & IX_OSAL_LE_DC) == 0, "LE Data Coherency not supported");
+ map->virtualAddress = (UINT32) ioremap (map->physicalAddress, map->size);
+ }
+
diff --git a/net-misc/ixp4xx/files/2.1/35-oe-assert.patch b/net-misc/ixp4xx/files/2.1/35-oe-assert.patch
new file mode 100644
index 000000000000..0ba1e0f0fcf7
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/35-oe-assert.patch
@@ -0,0 +1,37 @@
+# Unnecessary patch - reduces the code size slightly, gives clearer
+# messages if IX_OSAL_ENSURE_ON is set
+--- ixp_osal/include/IxOsalAssert.h
++++ ixp_osal/include/IxOsalAssert.h
+@@ -72,8 +72,8 @@
+ */
+ #ifdef IX_OSAL_ENSURE_ON
+ #define IX_OSAL_ENSURE(c, str) do { \
+-if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, str, \
+-0, 0, 0, 0, 0, 0); } while (0)
++if (!(c)) ixOsalLog (IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, __FILE__ ": line %d: " str, \
++__LINE__, 0, 0, 0, 0, 0); } while (0)
+
+ #else
+ #define IX_OSAL_ENSURE(c, str)
+--- ixp_osal/os/linux/include/core/IxOsalOsAssert.h
++++ ixp_osal/os/linux/include/core/IxOsalOsAssert.h
+@@ -47,11 +47,18 @@
+
+ #ifndef IxOsalOsAssert_H
+ #define IxOsalOsAssert_H
++#ifdef IX_OSAL_ENSURE_ON
+ #define IX_OSAL_OS_ASSERT(c) if(!(c)) \
+ { \
+- ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "Assertion failure \n", 0, 0, 0, 0, 0, 0);\
++ ixOsalLog (IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, "%s line %d: Assertion failure: %s\n", (int)__FILE__, __LINE__, (int)#c, 0, 0, 0);\
+ BUG(); \
+ }
++#else
++#define IX_OSAL_OS_ASSERT(c) if(!(c)) \
++ { \
++ BUG(); \
++ }
++#endif
+
+ /*
+ * Place holder.
diff --git a/net-misc/ixp4xx/files/2.1/40-yvasilev-oslinux.patch b/net-misc/ixp4xx/files/2.1/40-yvasilev-oslinux.patch
new file mode 100644
index 000000000000..6c2228dded67
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/40-yvasilev-oslinux.patch
@@ -0,0 +1,20 @@
+--- ixp400_xscale_sw/src/oslinux/IxLinuxInit.c
++++ ixp400_xscale_sw/src/oslinux/IxLinuxInit.c
+@@ -160,7 +160,7 @@ int ixNpe_dev_open (struct inode *inode,
+ return -EEXIST;
+ }
+
+- MOD_INC_USE_COUNT; /* Increment use count to prevent premature rmmod-ing */
++ /* MOD_INC_USE_COUNT; */ /* Increment use count to prevent premature rmmod-ing */
+ ixNpeDlSegmentedListHead = NULL; /* Reset linked list which keeps track of Microcode fragments */
+ ixNpeDlSegmentedListTail = NULL;
+ ixNpeDlTotalBytesReadIn = 0;
+@@ -225,7 +225,7 @@ int ixNpe_dev_release (struct inode *ino
+ kfree (temp);
+ }
+
+- MOD_DEC_USE_COUNT;
++ /* MOD_DEC_USE_COUNT; */
+
+ return 0;
+ }
diff --git a/net-misc/ixp4xx/files/2.1/41-oemod-Makefile.patch b/net-misc/ixp4xx/files/2.1/41-oemod-Makefile.patch
new file mode 100644
index 000000000000..68bb33a2399b
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/41-oemod-Makefile.patch
@@ -0,0 +1,55 @@
+--- ixp400_xscale_sw/Makefile
++++ ixp400_xscale_sw/Makefile
+@@ -297,9 +297,9 @@ endif
+ else # IX_TARGET_OS == vxworks
+ # linux compiler flags
+ MAKE_DEP_FLAG := -M
+-LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
++LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mtune=xscale
+
+-CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -mshort-load-bytes -msoft-float -DMODULE -Isrc/include -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS)
++CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -msoft-float -DMODULE -Isrc/include -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS)
+ ifndef IX_INCLUDE_MICROCODE
+ CFLAGS += -DIX_NPEDL_READ_MICROCODE_FROM_FILE
+ endif
+@@ -867,9 +867,11 @@ $(NPE_DAT) : $(NPE_CONVERTER)
+
+ ifeq ($(IX_HOST_OS),linux)
+ ifndef IX_INCLUDE_MICROCODE
++ifdef IX_BUILD_MICROCODE
+ Makefile: $(NPE_CONVERTER) $(NPE_DAT)
+ endif
+ endif
++endif
+
+ ################################################################
+ # Rules to check that macros are defined.
+@@ -1319,6 +1321,10 @@ endif
+
+ ixp400.o : $(OBJ_DIR)/ixp400.o
+
++ixp400.ko : $(OBJ_DIR)/ixp400.ko
++
++ixp400_eth.ko : $(OBJ_DIR)/ixp400_eth.ko
++
+ ifndef IX_INCLUDE_MICROCODE
+ $(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OBJ_DIR)/ixp400_%.o) $(OSAL_MODULE)
+ $(LD) $(LDFLAGS) $^ -o $@
+@@ -1327,7 +1333,17 @@ $(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OB
+ $(LD) $(LDFLAGS) $^ -o $@
+ endif
+
++$(OBJ_DIR)/ixp400_ial.o_shipped : $(OBJ_DIR)/ixp400.o
++ mv $^ $@
+
++$(OBJ_DIR)/ixp400.ko : $(OBJ_DIR)/ixp400_ial.o_shipped
++ cp Makefile.ixp400 $(OBJ_DIR)/Makefile
++ $(MAKE) LINUX_SRC=$($(IX_TARGET)_KERNEL_DIR) CROSS_COMPILE=$(LINUX_CROSS_COMPILE) -C $(OBJ_DIR) ixp400.ko
++
++$(OBJ_DIR)/ixp400_eth.ko : $(IX_XSCALE_SW)/../ixp400_eth.c
++ cp Makefile.ixp400_eth $(OBJ_DIR)/Makefile
++ cp $(IX_XSCALE_SW)/../ixp400_eth.c $(OBJ_DIR)/ixp400_eth.c
++ $(MAKE) LINUX_SRC=$($(IX_TARGET)_KERNEL_DIR) CROSS_COMPILE=$(LINUX_CROSS_COMPILE) OSAL_DIR=$(OSAL_DIR) -C $(OBJ_DIR) ixp400_eth.ko
+
+ ################################################################
+ # clean - deletes everything that can be rebuilt
diff --git a/net-misc/ixp4xx/files/2.1/42-yvasilev-Makefile-ixp400.patch b/net-misc/ixp4xx/files/2.1/42-yvasilev-Makefile-ixp400.patch
new file mode 100644
index 000000000000..3769e9cfe156
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/42-yvasilev-Makefile-ixp400.patch
@@ -0,0 +1,13 @@
+--- ixp400_xscale_sw/Makefile.ixp400
++++ ixp400_xscale_sw/Makefile.ixp400
+@@ -0,0 +1,10 @@
++obj-m := ixp400.o
++ixp400-y := ixp400_ial.o
++
++PWD := $(shell pwd)
++
++ixp400.ko:
++ $(MAKE) V=1 -C $(LINUX_SRC) SUBDIRS=$(PWD) ARCH=arm modules
++
++clean:
++ rm -f ixp400.ko
diff --git a/net-misc/ixp4xx/files/2.1/43-yvasilev-Makefile-ixp400_eth.patch b/net-misc/ixp4xx/files/2.1/43-yvasilev-Makefile-ixp400_eth.patch
new file mode 100644
index 000000000000..b53976d3a81a
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/43-yvasilev-Makefile-ixp400_eth.patch
@@ -0,0 +1,35 @@
+--- ixp400_xscale_sw/Makefile.ixp400_eth
++++ ixp400_xscale_sw/Makefile.ixp400_eth
+@@ -0,0 +1,32 @@
++obj-m := ixp400_eth.o
++
++PWD := $(shell pwd)
++
++CFLAGS = -Wall \
++ -DCONFIG_MODULES -DMODULES -O -I$(LINUX_SRC)/include/ \
++ -I$(IX_XSCALE_SW)/src/include/ \
++ -I$(OSAL_DIR)/ \
++ -I$(OSAL_DIR)/os/linux/include/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/ioMem/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/core/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/bufferMgt/ \
++ -I$(OSAL_DIR)/os/linux/include/core/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ \
++ -I$(OSAL_DIR)/os/linux/include/core/ \
++ -I$(OSAL_DIR)/include/ \
++ -I$(OSAL_DIR)/include/modules/ \
++ -I$(OSAL_DIR)/include/modules/bufferMgt/ \
++ -I$(OSAL_DIR)/include/modules/ioMem/ \
++ -I$(OSAL_DIR)/include/modules/core/ \
++ -I$(OSAL_DIR)/include/platforms/ \
++ -I$(OSAL_DIR)/include/platforms/ixp400/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ixp425/
++export CFLAGS
++
++ixp400_eth.ko:
++ $(MAKE) V=1 -C $(LINUX_SRC) SUBDIRS=$(PWD) ARCH=arm modules
++
++clean:
++ rm -f ixp400_eth.ko
diff --git a/net-misc/ixp4xx/files/2.1/50-oemod-ixp400_eth.patch b/net-misc/ixp4xx/files/2.1/50-oemod-ixp400_eth.patch
new file mode 100644
index 000000000000..a51f89b99536
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/50-oemod-ixp400_eth.patch
@@ -0,0 +1,171 @@
+--- ixp400_eth.c
++++ ixp400_eth.c
+@@ -128,6 +128,7 @@ static int dev_max_count = 2; /* only NP
+ static int dev_max_count = 3; /* all NPEs are used */
+ #endif
+
++static int dev_max_count = 1;
+ #ifndef CONFIG_IXP400_NAPI
+ /* netdev_max_backlog: ideally /proc/sys/net/core/netdev_max_backlog, but any
+ * value > 46 looks to work. This is used to control the maximum number of
+@@ -157,7 +158,11 @@ MODULE_PARM(dev_max_count, "i");
+ MODULE_PARM_DESC(dev_max_count, "Number of devices to initialize");
+
+ /* devices will be called ixp0 and ixp1 */
++#ifdef IX_DEVICE_NAME_ETH
++#define DEVICE_NAME "eth"
++#else
+ #define DEVICE_NAME "ixp"
++#endif
+
+ /* boolean values for PHY link speed, duplex, and autonegotiation */
+ #define PHY_SPEED_10 0
+@@ -347,6 +352,12 @@ static int dev_pmu_timer_init(void);
+ extern void
+ ixEthTxFrameDoneQMCallback(IxQMgrQId qId, IxQMgrCallbackId callbackId);
+
++#ifdef CONFIG_NET_POLL_CONTROLLER
++/* poll controller (needed for netconsole et al) */
++static void
++ixp425eth_poll_controller(struct net_device *dev);
++#endif
++
+ /* Private device data */
+ typedef struct {
+ spinlock_t lock; /* multicast management lock */
+@@ -1838,7 +1849,11 @@ static inline void dev_eth_type_trans(un
+ skb->len -= header_len;
+
+ /* fill the pkt arrival time (set at the irq callback entry) */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+ skb->stamp = irq_stamp;
++#else
++ skb_set_timestamp(skb, &irq_stamp);
++#endif
+
+ /* fill the input device field */
+ skb->dev = dev;
+@@ -2028,6 +2043,16 @@ static void rx_cb(UINT32 callbackTag, IX
+ skb->tail = skb->data + len;
+ skb->len = len;
+
++#ifndef __ARMEB__
++ {
++ /* Byte swap all words containing data from the buffer. */
++ unsigned long *p = (unsigned long*)((unsigned)skb->data & ~0x3);
++ unsigned long *e = (unsigned long*)(((unsigned)skb->data + skb->len + 3) & ~0x3);
++ while (p < e)
++ *p = ntohl(*p), ++p;
++ }
++#endif
++
+ #ifdef DEBUG_DUMP
+ skb_dump("rx", skb);
+ #endif
+@@ -2418,6 +2443,16 @@ static int dev_hard_start_xmit(struct sk
+ return 0;
+ }
+
++#ifndef __ARMEB__
++ {
++ /* Byte swap all words containing data from the buffer. */
++ unsigned long *p = (unsigned long*)((unsigned)skb->data & ~0x3);
++ unsigned long *e = (unsigned long*)(((unsigned)skb->data + skb->len + 3) & ~0x3);
++ while (p < e)
++ *p = ntohl(*p), ++p;
++ }
++#endif
++
+ #ifdef DEBUG_DUMP
+ skb_dump("tx", skb);
+ #endif
+@@ -3014,7 +3049,7 @@ static int phy_init(void)
+ }
+
+ /* set port MAC addr and update the dev struct if successfull */
+-int dev_set_mac_address(struct net_device *dev, void *addr)
++static int set_mac_address(struct net_device *dev, void *addr)
+ {
+ int res;
+ IxEthAccMacAddr npeMacAddr;
+@@ -3052,6 +3087,19 @@ int dev_set_mac_address(struct net_devic
+ return 0;
+ }
+
++#ifdef CONFIG_NET_POLL_CONTROLLER
++/*
++ * Polling receive - used by netconsole and other diagnostic tools
++ * to allow network i/o with interrupts disabled.
++ * (stolen from 8139too.c by siddy)
++ */
++static void ixp425eth_poll_controller(struct net_device *dev)
++{
++ disable_irq(dev->irq);
++ dev_qmgr_os_isr(dev->irq, dev, NULL);
++ enable_irq(dev->irq);
++}
++#endif
+
+ /*
+ * TX QDISC
+@@ -3241,6 +3289,8 @@ static int __devinit dev_eth_probe(struc
+ kmalloc(sizeof(struct semaphore), GFP_KERNEL);
+ if (!priv->maintenanceCheckThreadComplete)
+ {
++ P_ERROR("%s: Failed to allocate maintenance semaphore %d\n",
++ ndev->name, priv->port_id);
+ goto error;
+ }
+ priv->lock = SPIN_LOCK_UNLOCKED;
+@@ -3265,8 +3315,11 @@ static int __devinit dev_eth_probe(struc
+ ndev->get_stats = dev_get_stats;
+ ndev->set_multicast_list = dev_set_multicast_list;
+ ndev->flags |= IFF_MULTICAST;
++#ifdef CONFIG_NET_POLL_CONTROLLER
++ ndev->poll_controller = ixp425eth_poll_controller;
++#endif
+
+- ndev->set_mac_address = dev_set_mac_address;
++ ndev->set_mac_address = set_mac_address;
+
+ #ifdef CONFIG_IXP400_NAPI
+ ndev->poll = &dev_rx_poll;
+@@ -3347,7 +3400,11 @@ static int __devinit dev_eth_probe(struc
+
+ #if IS_KERNEL26
+ if (register_netdev(ndev))
++ {
++ P_ERROR("%s: Failed to register netdevice %d\n",
++ ndev->name, priv->port_id);
+ goto error;
++ }
+ #else
+ found_devices++;
+ #endif /* IS_KERNEL26 */
+@@ -3357,6 +3414,8 @@ static int __devinit dev_eth_probe(struc
+ /* register EthAcc callbacks for this port */
+ if (dev_rxtxcallback_register(portId, (UINT32)ndev))
+ {
++ P_ERROR("%s: Failed to register callback %d\n",
++ ndev->name, priv->port_id);
+ goto error;
+ }
+
+@@ -3380,6 +3439,7 @@ static int __devinit dev_eth_probe(struc
+
+ /* Error handling: enter here whenever error detected */
+ error:
++ P_ERROR("%s: dev_eth_probe fails\n", ndev->name);
+ TRACE;
+
+ #ifdef CONFIG_IXP400_ETH_QDISC_ENABLED
+@@ -3515,6 +3575,9 @@ static int __init ixp400_eth_init(void)
+ TRACE;
+
+ P_INFO("Initializing IXP400 NPE Ethernet driver software v. " MOD_VERSION " \n");
++#ifdef IX_OSAL_ENSURE_ON
++ ixOsalLogLevelSet(IX_OSAL_LOG_LVL_ALL);
++#endif
+
+ TRACE;
+
diff --git a/net-misc/ixp4xx/files/2.1/README b/net-misc/ixp4xx/files/2.1/README
new file mode 100644
index 000000000000..8d2900e2d2df
--- /dev/null
+++ b/net-misc/ixp4xx/files/2.1/README
@@ -0,0 +1 @@
+This patches are ripped from OE and Yuri Vasilevski
diff --git a/net-misc/ixp4xx/files/digest-ixp4xx-2.1 b/net-misc/ixp4xx/files/digest-ixp4xx-2.1
new file mode 100644
index 000000000000..870f2109f8bc
--- /dev/null
+++ b/net-misc/ixp4xx/files/digest-ixp4xx-2.1
@@ -0,0 +1,3 @@
+MD5 af63fe403d45ced9bb7bc6635de40be5 GPL_ixp400LinuxEthernetDriverPatch-1_5.zip 30291
+MD5 0fc2f6b2d33d6bf571a3f54260e39854 IPL_ixp400AccessLibrary-2_1.zip 2227460
+MD5 38305fb3875802fc431960ee51edbcdd IPL_ixp400NpeLibrary-2_1.zip 168570
diff --git a/net-misc/ixp4xx/ixp4xx-2.1.ebuild b/net-misc/ixp4xx/ixp4xx-2.1.ebuild
new file mode 100644
index 000000000000..dd87961f735f
--- /dev/null
+++ b/net-misc/ixp4xx/ixp4xx-2.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ixp4xx/ixp4xx-2.1.ebuild,v 1.1 2005/12/07 23:10:06 vapier Exp $
+
+inherit eutils toolchain-funcs linux-mod
+
+DESCRIPTION="kernel drivers for intel ixp4xx systems (like the NSLU2)"
+HOMEPAGE="http://www.intel.com/design/network/products/npfamily/ixp420.htm"
+SRC_URI="ftp://aiedownload.intel.com/df-support/9515/eng/IPL_ixp400AccessLibrary-2_1.zip
+ ftp://aiedownload.intel.com/df-support/9517/eng/IPL_ixp400NpeLibrary-2_1.zip
+ ftp://aiedownload.intel.com/df-support/9519/eng/GPL_ixp400LinuxEthernetDriverPatch-1_5.zip"
+
+LICENSE="ixp4xx"
+SLOT="0"
+KEYWORDS="-* arm"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND=""
+
+S=${WORKDIR}/ixp400_xscale_sw
+
+src_unpack() {
+ unpack ${A}
+ epatch "${FILESDIR}"/2.1/*.patch
+}
+
+src_compile() {
+ cd ixp400_xscale_sw
+ local ix_target
+ [[ $(tc-endian) == "little" ]] \
+ && ix_target=linuxle \
+ || ix_target=linuxbe
+ make \
+ LINUX_CROSS_COMPILE=${CHOST}- \
+ ${ix_target}_KERNEL_DIR=${KERNEL_DIR} \
+ IX_XSCALE_SW=${PWD} \
+ IX_TARGET=${ix_target} \
+ IX_DEVICE=ixp42X \
+ IX_PLATFORM=ixdp42x \
+ COMPONENTS="qmgr npeMh npeDl ethAcc ethDB ethMii featureCtrl osServices oslinux" \
+ IX_INCLUDE_MICROCODE=1 \
+ ixp400.${KV_OBJ} ixp400_eth.${KV_OBJ} \
+ || die "failed to build kernel modules"
+ cp lib/${ix_target}/ixp400.${KV_OBJ} lib/${ix_target}/ixp400_eth.${KV_OBJ} . || die
+}
+
+src_install() {
+ MODULE_NAMES="ixp400(kernel/drivers/ixp400:${S}) ixp400_eth(kernel/drivers/net:${S})"
+ linux-mod_src_install
+}
diff --git a/net-misc/ixp4xx/metadata.xml b/net-misc/ixp4xx/metadata.xml
new file mode 100644
index 000000000000..874dddb6a57c
--- /dev/null
+++ b/net-misc/ixp4xx/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>arm</herd>
+<herd>embedded</herd>
+</pkgmetadata>