summaryrefslogtreecommitdiff
path: root/packages/ixp425-eth
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/ixp425-eth
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/ixp425-eth')
-rw-r--r--packages/ixp425-eth/.mtn2git_empty0
-rw-r--r--packages/ixp425-eth/files/.mtn2git_empty0
-rw-r--r--packages/ixp425-eth/files/ethhdr.patch25
-rw-r--r--packages/ixp425-eth/files/makefile.patch18
-rw-r--r--packages/ixp425-eth/files/mm4.patch19
-rw-r--r--packages/ixp425-eth/files/pollcontroller.patch50
6 files changed, 112 insertions, 0 deletions
diff --git a/packages/ixp425-eth/.mtn2git_empty b/packages/ixp425-eth/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/ixp425-eth/.mtn2git_empty
diff --git a/packages/ixp425-eth/files/.mtn2git_empty b/packages/ixp425-eth/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/ixp425-eth/files/.mtn2git_empty
diff --git a/packages/ixp425-eth/files/ethhdr.patch b/packages/ixp425-eth/files/ethhdr.patch
index e69de29bb2..79c9fef34f 100644
--- a/packages/ixp425-eth/files/ethhdr.patch
+++ b/packages/ixp425-eth/files/ethhdr.patch
@@ -0,0 +1,25 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- ixp425-eth-1.1-r0/ixp425_eth.c~ethhdr
++++ ixp425-eth-1.1-r0/ixp425_eth.c
+@@ -1307,7 +1307,7 @@
+ * and its constants are taken from the eth_type_trans()
+ * function.
+ */
+- struct ethhdr *eth = skb->mac.ethernet;
++ struct ethhdr *eth = eth_hdr(skb);
+ unsigned short hproto = ntohs(eth->h_proto);
+
+ if (hproto >= 1536)
+@@ -1349,7 +1349,7 @@
+ * mode is set This costs
+ * a lookup inside the packet payload.
+ */
+- struct ethhdr *eth = skb->mac.ethernet;
++ struct ethhdr *eth = eth_hdr(skb);
+ unsigned char *hdest = eth->h_dest;
+
+ if (memcmp(hdest, dev->dev_addr, ETH_ALEN)!=0)
diff --git a/packages/ixp425-eth/files/makefile.patch b/packages/ixp425-eth/files/makefile.patch
index e69de29bb2..2e47972995 100644
--- a/packages/ixp425-eth/files/makefile.patch
+++ b/packages/ixp425-eth/files/makefile.patch
@@ -0,0 +1,18 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- /dev/null
++++ ixp425-eth-1.1-r0/Makefile
+@@ -0,0 +1,10 @@
++ifneq ($(KERNELRELEASE),)
++obj-m := ixp425_eth.o
++
++else
++KDIR := /lib/modules/$(shell uname -r)/build
++PWD := $(shell pwd)
++
++default modules:
++ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
++endif
diff --git a/packages/ixp425-eth/files/mm4.patch b/packages/ixp425-eth/files/mm4.patch
index e69de29bb2..c40aaca998 100644
--- a/packages/ixp425-eth/files/mm4.patch
+++ b/packages/ixp425-eth/files/mm4.patch
@@ -0,0 +1,19 @@
+# This corrects the type of dev_set_mac_address. The definition (prototype)
+# was *added* to include/linux/netdevice.h in the 2.6.11 mm patches, so the
+# change should not harm older builds
+--- ixp425-eth-1.1-r1/ixp425_eth.c.pre-mm4 2005-03-19 14:02:32.883601440 -0800
++++ ixp425-eth-1.1-r1/ixp425_eth.c 2005-03-19 14:03:25.849549392 -0800
+@@ -2347,12 +2347,11 @@
+ }
+
+ /* set port MAC addr and update the dev struct if successfull */
+-int dev_set_mac_address(struct net_device *dev, void *addr)
++int dev_set_mac_address(struct net_device *dev, struct sockaddr *saddr)
+ {
+ int res;
+ priv_data_t *priv = dev->priv;
+ IxEthAccMacAddr npeMacAddr;
+- struct sockaddr *saddr = (struct sockaddr *)addr;
+
+ /* Set MAC addr in h/w */
+ memcpy(&npeMacAddr.macAddress,
diff --git a/packages/ixp425-eth/files/pollcontroller.patch b/packages/ixp425-eth/files/pollcontroller.patch
index e69de29bb2..f95db28977 100644
--- a/packages/ixp425-eth/files/pollcontroller.patch
+++ b/packages/ixp425-eth/files/pollcontroller.patch
@@ -0,0 +1,50 @@
+# Add a poll controller to the interface - required for netconsole
+--- ixp425-eth-1.1-r1/ixp425_eth.c.pre-pollcontroller 2005-03-19 14:02:32.883601440 -0800
++++ ixp425-eth-1.1-r1/ixp425_eth.c 2005-03-19 14:03:25.849549392 -0800
+@@ -273,6 +273,11 @@
+ 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 {
+ unsigned int msdu_size;
+@@ -2462,6 +2467,10 @@
+ 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;
+
+ memcpy(ndev->dev_addr, &default_mac_addr[priv->port_id].macAddress,
+@@ -2491,6 +2500,23 @@
+ return res;
+ }
+
++
++#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
++
++
++
+ static int __devinit npe_eth_init_device(struct device *dev)
+ {
+ int res = -ENOMEM;