Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224354
b: refs/heads/master
c: 9d1e5e4
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 16, 2010
1 parent b42d989 commit 03c1b2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b178bb3dfc30d9555bdd2401e95af98e23e83e10
refs/heads/master: 9d1e5e40d6cac4bf7008e04c202d71918455ca11
19 changes: 8 additions & 11 deletions trunk/drivers/net/fec_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,8 @@ static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id)
{
struct net_device *dev = dev_id;
struct mpc52xx_fec_priv *priv = netdev_priv(dev);
unsigned long flags;

spin_lock_irqsave(&priv->lock, flags);
spin_lock(&priv->lock);
while (bcom_buffer_done(priv->tx_dmatsk)) {
struct sk_buff *skb;
struct bcom_fec_bd *bd;
Expand All @@ -379,7 +378,7 @@ static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id)

dev_kfree_skb_irq(skb);
}
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock(&priv->lock);

netif_wake_queue(dev);

Expand All @@ -395,9 +394,8 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)
struct bcom_fec_bd *bd;
u32 status, physaddr;
int length;
unsigned long flags;

spin_lock_irqsave(&priv->lock, flags);
spin_lock(&priv->lock);

while (bcom_buffer_done(priv->rx_dmatsk)) {

Expand Down Expand Up @@ -429,7 +427,7 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)

/* Process the received skb - Drop the spin lock while
* calling into the network stack */
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock(&priv->lock);

dma_unmap_single(dev->dev.parent, physaddr, rskb->len,
DMA_FROM_DEVICE);
Expand All @@ -438,10 +436,10 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)
rskb->protocol = eth_type_trans(rskb, dev);
netif_rx(rskb);

spin_lock_irqsave(&priv->lock, flags);
spin_lock(&priv->lock);
}

spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock(&priv->lock);

return IRQ_HANDLED;
}
Expand All @@ -452,7 +450,6 @@ static irqreturn_t mpc52xx_fec_interrupt(int irq, void *dev_id)
struct mpc52xx_fec_priv *priv = netdev_priv(dev);
struct mpc52xx_fec __iomem *fec = priv->fec;
u32 ievent;
unsigned long flags;

ievent = in_be32(&fec->ievent);

Expand All @@ -470,9 +467,9 @@ static irqreturn_t mpc52xx_fec_interrupt(int irq, void *dev_id)
if (net_ratelimit() && (ievent & FEC_IEVENT_XFIFO_ERROR))
dev_warn(&dev->dev, "FEC_IEVENT_XFIFO_ERROR\n");

spin_lock_irqsave(&priv->lock, flags);
spin_lock(&priv->lock);
mpc52xx_fec_reset(dev);
spin_unlock_irqrestore(&priv->lock, flags);
spin_unlock(&priv->lock);

return IRQ_HANDLED;
}
Expand Down

0 comments on commit 03c1b2d

Please sign in to comment.