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-23 09:06:47.274557678 +0100
4 +++ linux-3.1.10/drivers/net/lantiq_etop.c 2012-02-23 09:07:03.006558044 +0100
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);
12 + unsigned long flags;
14 while ((rx < budget) && !complete) {
15 struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc];
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);
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);
38 struct ltq_etop_priv *priv = netdev_priv(dev);
40 + unsigned long flags;
42 for (i = 0; i < MAX_DMA_CHAN; i++) {
43 struct ltq_etop_chan *ch = &priv->ch[i];
45 if (!IS_TX(i) && (!IS_RX(i)))
47 + spin_lock_irqsave(&priv->lock, flags);
48 ltq_dma_open(&ch->dma);
49 + spin_unlock_irqrestore(&priv->lock, flags);
50 napi_enable(&ch->napi);
55 struct ltq_etop_priv *priv = netdev_priv(dev);
57 + unsigned long flags;
59 netif_tx_stop_all_queues(dev);
62 if (!IS_RX(i) && !IS_TX(i))
64 napi_disable(&ch->napi);
65 + spin_lock_irqsave(&priv->lock, flags);
66 ltq_dma_close(&ch->dma);
67 + spin_unlock_irqrestore(&priv->lock, flags);