diff options
author | Florian Fainelli <florian@openwrt.org> | 2009-08-02 13:01:18 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2009-08-02 13:01:18 +0000 |
commit | ad1c9dde15aa5775d2f625ac993cafe20127e446 (patch) | |
tree | 01648884f5d475e93d2d3a37c4f0c757acc628db /target/linux/ar7/patches-2.6.30/900-cpmac_multiqueue.patch | |
parent | d96cfaeb1abf9088f499bd10071133a5b5d537d4 (diff) | |
download | master-187ad058-ad1c9dde15aa5775d2f625ac993cafe20127e446.tar.gz master-187ad058-ad1c9dde15aa5775d2f625ac993cafe20127e446.tar.bz2 master-187ad058-ad1c9dde15aa5775d2f625ac993cafe20127e446.zip |
[ar7] add experimental support for 2.6.30
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17097 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar7/patches-2.6.30/900-cpmac_multiqueue.patch')
-rw-r--r-- | target/linux/ar7/patches-2.6.30/900-cpmac_multiqueue.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/target/linux/ar7/patches-2.6.30/900-cpmac_multiqueue.patch b/target/linux/ar7/patches-2.6.30/900-cpmac_multiqueue.patch new file mode 100644 index 0000000000..3df3d68324 --- /dev/null +++ b/target/linux/ar7/patches-2.6.30/900-cpmac_multiqueue.patch @@ -0,0 +1,70 @@ +This patch fixes the network driver cpmac.c for compilation with +configuration option CONFIG_NETDEVICES_MULTIQUEUE. + +These compiler warnings are fixed by the patch: +drivers/net/cpmac.c: In function 'cpmac_end_xmit': +drivers/net/cpmac.c:630: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast +drivers/net/cpmac.c:641: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast +drivers/net/cpmac.c: In function 'cpmac_probe': +drivers/net/cpmac.c:1128: warning: unused variable 'i' + +During runtime, the unpatched driver raises a fatal runtime exception. +This is fixed by calling __netif_subqueue_stopped instead +of netif_subqueue_stopped, too. + +Two additional code parts were modified for CONFIG_NETDEVICES_MULTIQUEUE +because other drivers do it in the same way. + + Signed-off-by: Stefan Weil <weil@mail.berlios.de> + +--- a/drivers/net/cpmac.c ++++ b/drivers/net/cpmac.c +@@ -615,13 +615,13 @@ static void cpmac_end_xmit(struct net_de + + dev_kfree_skb_irq(desc->skb); + desc->skb = NULL; +- if (netif_subqueue_stopped(dev, queue)) ++ if (__netif_subqueue_stopped(dev, queue)) + netif_wake_subqueue(dev, queue); + } else { + if (netif_msg_tx_err(priv) && net_ratelimit()) + printk(KERN_WARNING + "%s: end_xmit: spurious interrupt\n", dev->name); +- if (netif_subqueue_stopped(dev, queue)) ++ if (__netif_subqueue_stopped(dev, queue)) + netif_wake_subqueue(dev, queue); + } + } +@@ -731,7 +731,6 @@ static void cpmac_clear_tx(struct net_de + + static void cpmac_hw_error(struct work_struct *work) + { +- int i; + struct cpmac_priv *priv = + container_of(work, struct cpmac_priv, reset_work); + +@@ -818,7 +817,6 @@ static irqreturn_t cpmac_irq(int irq, vo + + static void cpmac_tx_timeout(struct net_device *dev) + { +- int i; + struct cpmac_priv *priv = netdev_priv(dev); + + spin_lock(&priv->lock); +@@ -1097,7 +1095,7 @@ static int external_switch; + + static int __devinit cpmac_probe(struct platform_device *pdev) + { +- int rc, phy_id, i; ++ int rc, phy_id; + char *mdio_bus_id = "0"; + struct resource *mem; + struct cpmac_priv *priv; +@@ -1125,6 +1123,7 @@ static int __devinit cpmac_probe(struct + } + + dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES); ++ //~ dev = alloc_etherdev(sizeof(*priv)); + + if (!dev) { + printk(KERN_ERR "cpmac: Unable to allocate net_device\n"); |