aboutsummaryrefslogtreecommitdiffstats
path: root/packages/ixp425-eth
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2005-11-21 07:23:02 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-11-21 07:23:02 +0000
commit59dda76b85bec1d4666d1d688c35cdf230586c4a (patch)
treed2f6a7dec93e06d0c53febc8a22e1932632e951d /packages/ixp425-eth
parent7a245f350a82e342742b549543471f0c5855c48f (diff)
downloadopenembedded-59dda76b85bec1d4666d1d688c35cdf230586c4a.tar.gz
ixp400-eth: release for ixp4xx release 2.1: 1.5
Diffstat (limited to 'packages/ixp425-eth')
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.5/.mtn2git_empty0
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.5/2.6.14.patch32
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.5/2.6.15.patch13
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.5/Makefile.patch33
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.5/debug.patch51
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.5/device-name.patch14
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.5/le.patch36
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.5/poll-controller.patch45
-rw-r--r--packages/ixp425-eth/ixp400-eth_1.5.bb82
9 files changed, 306 insertions, 0 deletions
diff --git a/packages/ixp425-eth/ixp400-eth-1.5/.mtn2git_empty b/packages/ixp425-eth/ixp400-eth-1.5/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.5/.mtn2git_empty
diff --git a/packages/ixp425-eth/ixp400-eth-1.5/2.6.14.patch b/packages/ixp425-eth/ixp400-eth-1.5/2.6.14.patch
new file mode 100644
index 0000000000..9d8dcc6590
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.5/2.6.14.patch
@@ -0,0 +1,32 @@
+--- ./ixp400_eth.c 2005-11-19 23:27:54.541565744 -0800
++++ ./ixp400_eth.c 2005-11-19 23:28:56.253449028 -0800
+@@ -1838,7 +1838,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;
+@@ -3014,7 +3018,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;
+@@ -3266,7 +3270,7 @@ static int __devinit dev_eth_probe(struc
+ ndev->set_multicast_list = dev_set_multicast_list;
+ ndev->flags |= IFF_MULTICAST;
+
+- ndev->set_mac_address = dev_set_mac_address;
++ ndev->set_mac_address = set_mac_address;
+
+ #ifdef CONFIG_IXP400_NAPI
+ ndev->poll = &dev_rx_poll;
diff --git a/packages/ixp425-eth/ixp400-eth-1.5/2.6.15.patch b/packages/ixp425-eth/ixp400-eth-1.5/2.6.15.patch
new file mode 100644
index 0000000000..143c509c62
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.5/2.6.15.patch
@@ -0,0 +1,13 @@
+--- ./ixp400_eth.c.orig 2005-11-13 16:17:57.943717806 -0800
++++ ./ixp400_eth.c 2005-11-13 16:29:00.829430574 -0800
+@@ -65,6 +65,10 @@
+ #include <linux/sysctl.h>
+ #include <linux/unistd.h>
+
++#ifndef to_platform_device
++#include <linux/platform_device.h>
++#endif
++
+ /*
+ * Intel IXP400 Software specific header files
+ */
diff --git a/packages/ixp425-eth/ixp400-eth-1.5/Makefile.patch b/packages/ixp425-eth/ixp400-eth-1.5/Makefile.patch
new file mode 100644
index 0000000000..2120391cbb
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.5/Makefile.patch
@@ -0,0 +1,33 @@
+--- ./Makefile 2005-09-06 00:17:15.000000000 -0700
++++ ./Makefile 2005-10-02 22:15:19.974595551 -0700
+@@ -0,0 +1,30 @@
++obj-m := ixp400_eth.o
++
++CFLAGS_ixp400_eth.o = -DWall \
++ -I$(IXP4XX_CSR_DIR) \
++ -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)/include/platforms/ixp400/xp425/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ixp425/ \
++ $(IX_CFLAGS)
++
++default:
++ $(MAKE) ARCH=arm CROSS_COMPILE=$(LINUX_CROSS_COMPILE) $(KERNEL_VERBOSE) symverfile=$(IXP4XX_CSR_SYMVERS) -C $(LINUX_SRC) SUBDIRS=$(PWD) modules
++
++clean:
++ rm -f ixp400_eth.ko
diff --git a/packages/ixp425-eth/ixp400-eth-1.5/debug.patch b/packages/ixp425-eth/ixp400-eth-1.5/debug.patch
new file mode 100644
index 0000000000..f88457c060
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.5/debug.patch
@@ -0,0 +1,51 @@
+# This patch is not necessary but helps when debugging the build
+--- ./ixp400_eth.c 2005-11-20 13:26:14.890767165 -0800
++++ ./ixp400_eth.c 2005-11-20 13:45:32.163589752 -0800
+@@ -3249,6 +3249,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;
+@@ -3355,7 +3361,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 */
+@@ -3365,6 +3375,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;
+ }
+
+@@ -3388,6 +3400,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
+@@ -3523,6 +3536,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/packages/ixp425-eth/ixp400-eth-1.5/device-name.patch b/packages/ixp425-eth/ixp400-eth-1.5/device-name.patch
new file mode 100644
index 0000000000..b0e0d329e6
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.5/device-name.patch
@@ -0,0 +1,14 @@
+--- ./ixp400_eth.c 2005-11-20 16:58:48.973330982 -0800
++++ ./ixp400_eth.c 2005-11-20 17:01:26.719257307 -0800
+@@ -161,7 +161,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
diff --git a/packages/ixp425-eth/ixp400-eth-1.5/le.patch b/packages/ixp425-eth/ixp400-eth-1.5/le.patch
new file mode 100644
index 0000000000..37c4150bc9
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.5/le.patch
@@ -0,0 +1,36 @@
+--- ./ixp400_eth.c 2005-11-20 18:25:26.812410374 -0800
++++ ./ixp400_eth.c 2005-11-20 18:50:22.126504557 -0800
+@@ -2046,6 +2046,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
+@@ -2436,6 +2446,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
diff --git a/packages/ixp425-eth/ixp400-eth-1.5/poll-controller.patch b/packages/ixp425-eth/ixp400-eth-1.5/poll-controller.patch
new file mode 100644
index 0000000000..22049c3491
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.5/poll-controller.patch
@@ -0,0 +1,45 @@
+--- ./ixp400_eth.c 2005-11-19 23:36:44.482912850 -0800
++++ ./ixp400_eth.c 2005-11-19 23:39:13.080263492 -0800
+@@ -347,6 +347,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 */
+@@ -3056,6 +3062,19 @@ static int set_mac_address(struct net_de
+ 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
+@@ -3269,6 +3288,9 @@ 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 = set_mac_address;
+
diff --git a/packages/ixp425-eth/ixp400-eth_1.5.bb b/packages/ixp425-eth/ixp400-eth_1.5.bb
new file mode 100644
index 0000000000..9564210917
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth_1.5.bb
@@ -0,0 +1,82 @@
+# This is the Intel GPL IXP4XX ethernet driver (Linux) plus patches
+# to make it work on 2.6 kernels.
+#
+MAINTAINER = "NSLU2 Linux <nslu2-linux@yahoogroups.com>"
+HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp420.htm"
+LICENSE = "GPL"
+
+SRC_URI = "ftp://aiedownload.intel.com/df-support/9519/eng/GPL_ixp400LinuxEthernetDriverPatch-1_5.zip"
+SRC_URI += "file://Makefile.patch;patch=1"
+SRC_URI += "file://2.6.14.patch;patch=1"
+SRC_URI += "file://2.6.15.patch;patch=1"
+SRC_URI += "file://device-name.patch;patch=1"
+SRC_URI += "file://poll-controller.patch;patch=1"
+SRC_URI += "file://le.patch;patch=1"
+SRC_URI += "file://debug.patch;patch=1"
+
+PR = "r0"
+
+DEPENDS = "ixp4xx-csr"
+RDEPENDS = "ixp4xx-csr"
+
+S = "${WORKDIR}"
+
+COMPATIBLE_HOST = "^arm.*-linux.*"
+
+PROVIDES = "virtual/ixp-eth"
+
+inherit module
+
+# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
+# required. Notice that this has to be done for each separately built
+# module as well!
+KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
+KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
+
+# This is a somewhat arbitrary choice:
+OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"
+
+IX_TARGET = "linux${ARCH_BYTE_SEX}"
+IX_ENSURE = ""
+#IX_ENSURE = "-DIX_OSAL_ENSURE_ON=1"
+# The following controls the name of the ethernet devices which get
+# registered, the default (if this is empty) is ixp0, ixp1, otherwise
+# it is eth0, eth1
+DEVICE_NAME = "-DIX_DEVICE_NAME_ETH=1"
+
+IXP4XX_CSR_SYMVERS = "${STAGING_KERNEL_DIR}/ixp400-csr.symvers"
+
+EXTRA_OEMAKE = "'PWD=${S}' \
+ 'IX_TARGET=${IX_TARGET}' \
+ 'IXP4XX_CSR_DIR=${STAGING_INCDIR}/linux/ixp4xx-csr' \
+ 'IXP4XX_CSR_SYMVERS=${IXP4XX_CSR_SYMVERS}' \
+ 'OSAL_DIR=${OSAL_DIR}' \
+ 'IX_CFLAGS=-DIX_UTOPIAMODE=0 -DIX_MPHYSINGLEPORT=1 -DCONFIG_IXP400_ETH_NPEB_ONLY=1 ${IX_ENSURE} ${DEVICE_NAME} -DIX_COMPONENT_NAME=-1' \
+ 'LINUX_SRC=${STAGING_KERNEL_DIR}' \
+ 'LINUX_CROSS_COMPILE=${HOST_PREFIX}' \
+ "
+
+# This is to check for unresolved symbol errors and ensure the build
+# fails, an error here probably means too much as been deconfigured
+# out of ixp4xx-csr.
+KCONFIG_FILE = "${STAGING_KERNEL_DIR}/config-${KERNEL_VERSION}"
+do_compile_append () {
+ . '${KCONFIG_FILE}'
+ echo "MODPOST: checking that all symbols are resolved"
+ if '${STAGING_KERNEL_DIR}/scripts/mod/modpost' \
+ ${CONFIG_MODVERSIONS:+-m} \
+ ${CONFIG_MODULE_SRCVERSION_ALL:+-a} \
+ -i '${STAGING_KERNEL_DIR}/ixp400-csr.symvers' \
+ ixp400_eth.o >&2 | egrep .
+ then
+ echo "MODPOST errors - see above"
+ return 1
+ else
+ return 0
+ fi
+}
+
+do_install () {
+ install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net
+ install -m 0644 ixp400_eth.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/
+}