Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347320
b: refs/heads/master
c: 4945106
h: refs/heads/master
v: v3
  • Loading branch information
Lennert Buytenhek authored and David S. Miller committed Dec 19, 2012
1 parent 1b0777b commit 84e942e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 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: 341abdbe38ca22f351c9db68a69382fa57350066
refs/heads/master: 4945106d21926eadaaa1c5465d26d9a0d26a2420
12 changes: 9 additions & 3 deletions trunk/drivers/net/ethernet/micrel/ksz884x.c
Original file line number Diff line number Diff line change
Expand Up @@ -4761,7 +4761,7 @@ static void transmit_cleanup(struct dev_info *hw_priv, int normal)
struct ksz_dma_buf *dma_buf;
struct net_device *dev = NULL;

spin_lock(&hw_priv->hwlock);
spin_lock_irq(&hw_priv->hwlock);
last = info->last;

while (info->avail < info->alloc) {
Expand Down Expand Up @@ -4795,7 +4795,7 @@ static void transmit_cleanup(struct dev_info *hw_priv, int normal)
info->avail++;
}
info->last = last;
spin_unlock(&hw_priv->hwlock);
spin_unlock_irq(&hw_priv->hwlock);

/* Notify the network subsystem that the packet has been sent. */
if (dev)
Expand Down Expand Up @@ -5259,11 +5259,15 @@ static irqreturn_t netdev_intr(int irq, void *dev_id)
struct dev_info *hw_priv = priv->adapter;
struct ksz_hw *hw = &hw_priv->hw;

spin_lock(&hw_priv->hwlock);

hw_read_intr(hw, &int_enable);

/* Not our interrupt! */
if (!int_enable)
if (!int_enable) {
spin_unlock(&hw_priv->hwlock);
return IRQ_NONE;
}

do {
hw_ack_intr(hw, int_enable);
Expand Down Expand Up @@ -5310,6 +5314,8 @@ static irqreturn_t netdev_intr(int irq, void *dev_id)

hw_ena_intr(hw);

spin_unlock(&hw_priv->hwlock);

return IRQ_HANDLED;
}

Expand Down

0 comments on commit 84e942e

Please sign in to comment.