kernel: fix a relative addressing bug in the mips module relocation code change
[openwrt.git] / target / linux / ar7 / patches-2.6.27 / 900-cpmac_multiqueue.patch
1 This patch fixes the network driver cpmac.c for compilation with
2 configuration option CONFIG_NETDEVICES_MULTIQUEUE.
3
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'
10
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.
14
15 Two additional code parts were modified for CONFIG_NETDEVICES_MULTIQUEUE
16 because other drivers do it in the same way.
17
18 Signed-off-by: Stefan Weil <weil@mail.berlios.de>
19
20 --- a/drivers/net/cpmac.c
21 +++ b/drivers/net/cpmac.c
22 @@ -621,13 +621,13 @@ static void cpmac_end_xmit(struct net_de
23
24 dev_kfree_skb_irq(desc->skb);
25 desc->skb = NULL;
26 - if (netif_subqueue_stopped(dev, queue))
27 + if (__netif_subqueue_stopped(dev, queue))
28 netif_wake_subqueue(dev, queue);
29 } else {
30 if (netif_msg_tx_err(priv) && net_ratelimit())
31 printk(KERN_WARNING
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);
36 }
37 }
38 @@ -737,7 +737,6 @@ static void cpmac_clear_tx(struct net_de
39
40 static void cpmac_hw_error(struct work_struct *work)
41 {
42 - int i;
43 struct cpmac_priv *priv =
44 container_of(work, struct cpmac_priv, reset_work);
45
46 @@ -824,7 +823,6 @@ static irqreturn_t cpmac_irq(int irq, vo
47
48 static void cpmac_tx_timeout(struct net_device *dev)
49 {
50 - int i;
51 struct cpmac_priv *priv = netdev_priv(dev);
52
53 spin_lock(&priv->lock);
54 @@ -1103,7 +1101,7 @@ static int external_switch;
55
56 static int __devinit cpmac_probe(struct platform_device *pdev)
57 {
58 - int rc, phy_id, i;
59 + int rc, phy_id;
60 char *mdio_bus_id = "0";
61 struct resource *mem;
62 struct cpmac_priv *priv;
63 @@ -1132,6 +1130,7 @@ static int __devinit cpmac_probe(struct
64 }
65
66 dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);
67 + //~ dev = alloc_etherdev(sizeof(*priv));
68
69 if (!dev) {
70 printk(KERN_ERR "cpmac: Unable to allocate net_device\n");
This page took 0.042649 seconds and 5 git commands to generate.