summaryrefslogtreecommitdiff
path: root/recipes/ixp425-eth/files
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/ixp425-eth/files
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/ixp425-eth/files')
-rw-r--r--recipes/ixp425-eth/files/2.6.13.patch41
-rw-r--r--recipes/ixp425-eth/files/2.6.14.patch28
-rw-r--r--recipes/ixp425-eth/files/ethhdr.patch25
-rw-r--r--recipes/ixp425-eth/files/intdriven.patch98
-rw-r--r--recipes/ixp425-eth/files/ixp400_pollcontroller.patch50
-rw-r--r--recipes/ixp425-eth/files/makefile.patch18
-rw-r--r--recipes/ixp425-eth/files/mm4.patch19
-rw-r--r--recipes/ixp425-eth/files/modprobe.conf3
-rw-r--r--recipes/ixp425-eth/files/pollcontroller.patch50
9 files changed, 332 insertions, 0 deletions
diff --git a/recipes/ixp425-eth/files/2.6.13.patch b/recipes/ixp425-eth/files/2.6.13.patch
new file mode 100644
index 0000000000..7e8bea1b5d
--- /dev/null
+++ b/recipes/ixp425-eth/files/2.6.13.patch
@@ -0,0 +1,41 @@
+# Patches for compilation with 2.6.13.2
+#
+--- dir/ixp425_eth.c 2005-09-23 18:34:54.753729121 -0700
++++ dir/ixp425_eth.c 2005-09-23 18:37:48.908688002 -0700
+@@ -659,7 +659,9 @@
+ skb->pkt_type = PACKET_HOST; /* Default type */
+ skb->ip_summed = 0;
+ skb->priority = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ skb->security = 0;
++#endif
+
+ /* Some packets may get incorrectly process by netfilter firewall software
+ * if CONFIG_NETFILTER is enabled and filtering is in use. The solution is to
+@@ -2358,8 +2362,14 @@
+ }
+
+ /* set port MAC addr and update the dev struct if successfull */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ int dev_set_mac_address(struct net_device *dev, struct sockaddr *saddr)
+ {
++#else
++static int set_mac_address(struct net_device *dev, void *saddrIn)
++{
++ struct sockaddr *saddr = saddrIn;
++#endif
+ int res;
+ priv_data_t *priv = dev->priv;
+ IxEthAccMacAddr npeMacAddr;
+@@ -2476,7 +2486,11 @@
+ ndev->poll_controller = ixp425eth_poll_controller;
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ ndev->set_mac_address = dev_set_mac_address;
++#else
++ ndev->set_mac_address = set_mac_address;
++#endif
+
+ memcpy(ndev->dev_addr, &default_mac_addr[priv->port_id].macAddress,
+ IX_IEEE803_MAC_ADDRESS_SIZE);
diff --git a/recipes/ixp425-eth/files/2.6.14.patch b/recipes/ixp425-eth/files/2.6.14.patch
new file mode 100644
index 0000000000..e93edb6e9b
--- /dev/null
+++ b/recipes/ixp425-eth/files/2.6.14.patch
@@ -0,0 +1,28 @@
+# change in field semantic in 2.6.14
+--- dir/ixp425_eth.c 2005-09-24 17:50:57.828607113 -0700
++++ dir/ixp425_eth.c 2005-09-24 17:54:19.593303365 -0700
+@@ -668,7 +668,11 @@
+ * reset the following fields in the skbuff before re-using it on the Rx-path
+ */
+ #ifdef CONFIG_NETFILTER
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+ skb->nfmark = skb->nfcache = 0;
++#else
++ skb->nfmark = 0;
++#endif
+ nf_conntrack_put(skb->nfct);
+ skb->nfct = NULL;
+ #ifdef CONFIG_NETFILTER_DEBUG
+@@ -1300,8 +1300,12 @@
+ 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.tv_sec = irq_stamp.tv_sec;
+ skb->stamp.tv_usec = irq_stamp.tv_usec;
++#else
++ skb_set_timestamp(skb, &irq_stamp);
++#endif
+
+ /* fill the input device field */
+ skb->dev = dev;
diff --git a/recipes/ixp425-eth/files/ethhdr.patch b/recipes/ixp425-eth/files/ethhdr.patch
new file mode 100644
index 0000000000..79c9fef34f
--- /dev/null
+++ b/recipes/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/recipes/ixp425-eth/files/intdriven.patch b/recipes/ixp425-eth/files/intdriven.patch
new file mode 100644
index 0000000000..88b2444b5e
--- /dev/null
+++ b/recipes/ixp425-eth/files/intdriven.patch
@@ -0,0 +1,98 @@
+--- ixp425-eth-1.1-r4/ixp425_eth.c 2005-06-16 00:47:55.360598896 -0700
++++ ixp425-eth-1.1-r4/ixp425_eth.c 2005-06-16 18:42:09.840377651 -0700
+@@ -1028,6 +1030,7 @@
+ */
+
+ /* PMU Timer reload : this should be done at each interrupt */
++#if 0 /* UNUSED - used for polling */
+ static void dev_pmu_timer_restart(void)
+ {
+ __asm__(" mcr p14,0,%0,c1,c1,0\n" /* write current counter */
+@@ -1039,6 +1042,7 @@
+ " mcr p14,0,r1,c4,c1,0\n" /* enable interrupts */
+ : : : "r1");
+ }
++#endif
+
+ /* Internal ISR : run a few thousand times per second and calls
+ * the queue manager dispatcher entry point.
+@@ -1086,6 +1088,7 @@
+ /* Internal ISR : run a few thousand times per second and calls
+ * the ethernet entry point.
+ */
++#if 0 /* UNUSED - used for polling */
+ static irqreturn_t dev_poll_os_isr(int irg, void *dev_id, struct pt_regs *regs)
+ {
+ int qlevel = __get_cpu_var(softnet_data).input_pkt_queue.qlen;
+@@ -1127,8 +1130,10 @@
+ ixEthTxFrameDoneQMCallback(0,0);
+ return IRQ_HANDLED;
+ }
++#endif
+
+ /* initialize the PMU timer */
++#if 0 /* UNUSED - used for polling */
+ static int dev_pmu_timer_init(void)
+ {
+ UINT32 controlRegisterMask =
+@@ -1164,6 +1169,7 @@
+
+ return 0;
+ }
++#endif
+
+ /* stops the timer when the module terminates */
+ static void dev_pmu_timer_disable(void)
+@@ -1636,6 +1636,7 @@
+ return 0;
+ }
+
++#if 0 /* UNUSED - used for polling */
+ /* The QMgr dispatch entry point can be called from the
+ * IXP425_INT_LVL_QM1 irq (which will trigger
+ * an interrupt for every packet) or a timer (which will
+@@ -1686,7 +1687,7 @@
+ */
+ if (request_irq(IXP425_INT_LVL_QM1,
+ dev_qmgr_os_isr,
+- SA_SHIRQ,
++ SA_SHIRQ | SA_SAMPLE_RANDOM,
+ DRV_NAME,
+ (void *)IRQ_ANY_PARAMETER))
+ {
+@@ -1710,6 +1711,7 @@
+ }
+ return 0;
+ }
++#endif
+
+ /* Enable the MAC port.
+ * Called on do_dev_open, dev_tx_timeout and mtu size changes
+@@ -2234,7 +2236,7 @@
+ */
+ if (request_irq(IXP425_INT_LVL_QM1,
+ dev_qmgr_os_isr,
+- SA_SHIRQ,
++ SA_SHIRQ | SA_SAMPLE_RANDOM,
+ DRV_NAME,
+ (void *)IRQ_ANY_PARAMETER))
+ {
+@@ -2669,6 +2671,10 @@
+
+ TRACE;
+
++#if 0 /* DISABLE polling */
++ /* Enable Interrupt driven driver
++ * see http://www.nslu2-linux.org/wiki/OpenSlug/StabilizeEthernetDriver
++ */
+ if (no_csr_init == 0) /* module parameter */
+ {
+ /* The QMgr dispatch entry point is called from the IXP425_INT_LVL_QM1 irq
+@@ -2681,6 +2687,7 @@
+ return res;
+ }
+ }
++#endif
+
+ TRACE;
+
diff --git a/recipes/ixp425-eth/files/ixp400_pollcontroller.patch b/recipes/ixp425-eth/files/ixp400_pollcontroller.patch
new file mode 100644
index 0000000000..b6fe10a5c6
--- /dev/null
+++ b/recipes/ixp425-eth/files/ixp400_pollcontroller.patch
@@ -0,0 +1,50 @@
+*** ixp400-eth-1.4-r4/ixp400_eth.c.orig Mon Oct 31 22:45:46 2005
+--- ixp400-eth-1.4-r4/ixp400_eth.c Mon Oct 31 22:47:48 2005
+***************
+*** 306,311 ****
+--- 306,316 ----
+ ixEthRxFrameQMCallback(IxQMgrQId qId, IxQMgrCallbackId callbackId);
+ 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 {
+***************
+*** 3082,3087 ****
+--- 3087,3095 ----
+ 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
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ ndev->set_mac_address = dev_set_mac_address;
+ #else
+***************
+*** 3172,3177 ****
+--- 3180,3198 ----
+ 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)
+ {
diff --git a/recipes/ixp425-eth/files/makefile.patch b/recipes/ixp425-eth/files/makefile.patch
new file mode 100644
index 0000000000..2e47972995
--- /dev/null
+++ b/recipes/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/recipes/ixp425-eth/files/mm4.patch b/recipes/ixp425-eth/files/mm4.patch
new file mode 100644
index 0000000000..c40aaca998
--- /dev/null
+++ b/recipes/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/recipes/ixp425-eth/files/modprobe.conf b/recipes/ixp425-eth/files/modprobe.conf
new file mode 100644
index 0000000000..bfcbf916cf
--- /dev/null
+++ b/recipes/ixp425-eth/files/modprobe.conf
@@ -0,0 +1,3 @@
+# Add an alias for eth0 to ixp425_eth to cause the S40networking
+# init script to load the ixp425_eth driver on the first boot
+alias eth0 ixp425_eth
diff --git a/recipes/ixp425-eth/files/pollcontroller.patch b/recipes/ixp425-eth/files/pollcontroller.patch
new file mode 100644
index 0000000000..f95db28977
--- /dev/null
+++ b/recipes/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;