[ar71xx] Fix partitions for Cameo-based boards; kernel 3.2 is bigger
[openwrt.git] / target / linux / lantiq / patches / 850-etop_irq.patch
1 Index: linux-3.1.10/drivers/net/lantiq_etop.c
2 ===================================================================
3 --- linux-3.1.10.orig/drivers/net/lantiq_etop.c 2012-02-09 10:07:01.180680919 +0100
4 +++ linux-3.1.10/drivers/net/lantiq_etop.c 2012-02-09 10:11:00.996691173 +0100
5 @@ -203,8 +203,10 @@
6 {
7 struct ltq_etop_chan *ch = container_of(napi,
8 struct ltq_etop_chan, napi);
9 + struct ltq_etop_priv *priv = netdev_priv(ch->netdev);
10 int rx = 0;
11 int complete = 0;
12 + unsigned long flags;
13
14 while ((rx < budget) && !complete) {
15 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc];
16 @@ -218,7 +220,9 @@
17 }
18 if (complete || !rx) {
19 napi_complete(&ch->napi);
20 + spin_lock_irqsave(&priv->lock, flags);
21 ltq_dma_ack_irq(&ch->dma);
22 + spin_unlock_irqrestore(&priv->lock, flags);
23 }
24 return rx;
25 }
26 @@ -248,7 +252,9 @@
27 if (netif_tx_queue_stopped(txq))
28 netif_tx_start_queue(txq);
29 napi_complete(&ch->napi);
30 + spin_lock_irqsave(&priv->lock, flags);
31 ltq_dma_ack_irq(&ch->dma);
32 + spin_unlock_irqrestore(&priv->lock, flags);
33 return 1;
34 }
35
36 @@ -615,13 +621,17 @@
37 {
38 struct ltq_etop_priv *priv = netdev_priv(dev);
39 int i;
40 + unsigned long flags;
41
42 for (i = 0; i < MAX_DMA_CHAN; i++) {
43 struct ltq_etop_chan *ch = &priv->ch[i];
44
45 if (!IS_TX(i) && (!IS_RX(i)))
46 continue;
47 + spin_lock_irqsave(&priv->lock, flags);
48 ltq_dma_open(&ch->dma);
49 + ltq_dma_ack_irq(&ch->dma);
50 + spin_unlock_irqrestore(&priv->lock, flags);
51 napi_enable(&ch->napi);
52 }
53 if (priv->phydev)
54 @@ -635,6 +645,7 @@
55 {
56 struct ltq_etop_priv *priv = netdev_priv(dev);
57 int i;
58 + unsigned long flags;
59
60 netif_tx_stop_all_queues(dev);
61 if (priv->phydev)
62 @@ -645,7 +656,9 @@
63 if (!IS_RX(i) && !IS_TX(i))
64 continue;
65 napi_disable(&ch->napi);
66 + spin_lock_irqsave(&priv->lock, flags);
67 ltq_dma_close(&ch->dma);
68 + spin_unlock_irqrestore(&priv->lock, flags);
69 }
70 return 0;
71 }
This page took 0.051496 seconds and 5 git commands to generate.