aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/micrel
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/micrel')
-rw-r--r--drivers/net/ethernet/micrel/ksz884x.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 83f0ea929d3d..8ebc352bcbe6 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -4761,7 +4761,7 @@ static void transmit_cleanup(struct dev_info *hw_priv, int normal)
4761 struct ksz_dma_buf *dma_buf; 4761 struct ksz_dma_buf *dma_buf;
4762 struct net_device *dev = NULL; 4762 struct net_device *dev = NULL;
4763 4763
4764 spin_lock(&hw_priv->hwlock); 4764 spin_lock_irq(&hw_priv->hwlock);
4765 last = info->last; 4765 last = info->last;
4766 4766
4767 while (info->avail < info->alloc) { 4767 while (info->avail < info->alloc) {
@@ -4795,7 +4795,7 @@ static void transmit_cleanup(struct dev_info *hw_priv, int normal)
4795 info->avail++; 4795 info->avail++;
4796 } 4796 }
4797 info->last = last; 4797 info->last = last;
4798 spin_unlock(&hw_priv->hwlock); 4798 spin_unlock_irq(&hw_priv->hwlock);
4799 4799
4800 /* Notify the network subsystem that the packet has been sent. */ 4800 /* Notify the network subsystem that the packet has been sent. */
4801 if (dev) 4801 if (dev)
@@ -5259,11 +5259,15 @@ static irqreturn_t netdev_intr(int irq, void *dev_id)
5259 struct dev_info *hw_priv = priv->adapter; 5259 struct dev_info *hw_priv = priv->adapter;
5260 struct ksz_hw *hw = &hw_priv->hw; 5260 struct ksz_hw *hw = &hw_priv->hw;
5261 5261
5262 spin_lock(&hw_priv->hwlock);
5263
5262 hw_read_intr(hw, &int_enable); 5264 hw_read_intr(hw, &int_enable);
5263 5265
5264 /* Not our interrupt! */ 5266 /* Not our interrupt! */
5265 if (!int_enable) 5267 if (!int_enable) {
5268 spin_unlock(&hw_priv->hwlock);
5266 return IRQ_NONE; 5269 return IRQ_NONE;
5270 }
5267 5271
5268 do { 5272 do {
5269 hw_ack_intr(hw, int_enable); 5273 hw_ack_intr(hw, int_enable);
@@ -5310,6 +5314,8 @@ static irqreturn_t netdev_intr(int irq, void *dev_id)
5310 5314
5311 hw_ena_intr(hw); 5315 hw_ena_intr(hw);
5312 5316
5317 spin_unlock(&hw_priv->hwlock);
5318
5313 return IRQ_HANDLED; 5319 return IRQ_HANDLED;
5314} 5320}
5315 5321