1 This patch fixes the network driver cpmac.c for compilation with
2 configuration option CONFIG_NETDEVICES_MULTIQUEUE.
4 These compiler warnings are fixed by the patch:
5 drivers/net/cpmac.c: In function 'cpmac_end_xmit':
6 drivers/net/cpmac.c:630: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast
7 drivers/net/cpmac.c:641: warning: passing argument 2 of 'netif_subqueue_stopped' makes pointer from integer without a cast
8 drivers/net/cpmac.c: In function 'cpmac_probe':
9 drivers/net/cpmac.c:1128: warning: unused variable 'i'
11 During runtime, the unpatched driver raises a fatal runtime exception.
12 This is fixed by calling __netif_subqueue_stopped instead
13 of netif_subqueue_stopped, too.
15 Two additional code parts were modified for CONFIG_NETDEVICES_MULTIQUEUE
16 because other drivers do it in the same way.
18 Signed-off-by: Stefan Weil <weil@mail.berlios.de>
20 --- a/drivers/net/cpmac.c
21 +++ b/drivers/net/cpmac.c
24 dev_kfree_skb_irq(desc->skb);
26 - if (netif_subqueue_stopped(dev, queue))
27 + if (__netif_subqueue_stopped(dev, queue))
28 netif_wake_subqueue(dev, queue);
30 if (netif_msg_tx_err(priv) && net_ratelimit())
32 "%s: end_xmit: spurious interrupt\n", dev->name);
33 - if (netif_subqueue_stopped(dev, queue))
34 + if (__netif_subqueue_stopped(dev, queue))
35 netif_wake_subqueue(dev, queue);
40 static void cpmac_hw_error(struct work_struct *work)
43 struct cpmac_priv *priv =
44 container_of(work, struct cpmac_priv, reset_work);
48 static void cpmac_tx_timeout(struct net_device *dev)
51 struct cpmac_priv *priv = netdev_priv(dev);
53 spin_lock(&priv->lock);
56 static int __devinit cpmac_probe(struct platform_device *pdev)
60 char *mdio_bus_id = "0";
62 struct cpmac_priv *priv;
66 dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);
67 + //~ dev = alloc_etherdev(sizeof(*priv));
70 printk(KERN_ERR "cpmac: Unable to allocate net_device\n");