1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-15 18:34:05 +02:00
openwrt-xburst/target/linux/ar7/patches-2.6.27/900-cpmac_multiqueue.patch
florian 928c7cd41c [ar7] update to 2.6.27 (#4122)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15665 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-05-07 12:17:56 +00:00

71 lines
2.1 KiB
Diff

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
@@ -621,13 +621,13 @@
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);
}
}
@@ -737,7 +737,6 @@
static void cpmac_hw_error(struct work_struct *work)
{
- int i;
struct cpmac_priv *priv =
container_of(work, struct cpmac_priv, reset_work);
@@ -824,7 +823,6 @@
static void cpmac_tx_timeout(struct net_device *dev)
{
- int i;
struct cpmac_priv *priv = netdev_priv(dev);
spin_lock(&priv->lock);
@@ -1103,7 +1101,7 @@
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;
@@ -1132,6 +1130,7 @@
}
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");