summaryrefslogtreecommitdiff
path: root/packages/ixp425-eth/ixp400-eth-1.5
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/ixp400-eth-1.5
parent7a245f350a82e342742b549543471f0c5855c48f (diff)
ixp400-eth: release for ixp4xx release 2.1: 1.5
Diffstat (limited to 'packages/ixp425-eth/ixp400-eth-1.5')
-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
8 files changed, 224 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;
+