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
22 @@ -615,13 +615,13 @@ static void cpmac_end_xmit(struct net_de
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);
38 @@ -731,7 +731,6 @@ static void cpmac_clear_tx(struct net_de
40 static void cpmac_hw_error(struct work_struct *work)
43 struct cpmac_priv *priv =
44 container_of(work, struct cpmac_priv, reset_work);
46 @@ -818,7 +817,6 @@ static irqreturn_t cpmac_irq(int irq, vo
48 static void cpmac_tx_timeout(struct net_device *dev)
51 struct cpmac_priv *priv = netdev_priv(dev);
53 spin_lock(&priv->lock);
54 @@ -1097,7 +1095,7 @@ static int external_switch;
56 static int __devinit cpmac_probe(struct platform_device *pdev)
60 char *mdio_bus_id = "0";
62 struct cpmac_priv *priv;
63 @@ -1125,6 +1123,7 @@ static int __devinit cpmac_probe(struct
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");