aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb/ixgb_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r--drivers/net/ixgb/ixgb_main.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index d9688bbb9292..9c9bf31e5c25 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -197,7 +197,6 @@ module_exit(ixgb_exit_module);
197static void 197static void
198ixgb_irq_disable(struct ixgb_adapter *adapter) 198ixgb_irq_disable(struct ixgb_adapter *adapter)
199{ 199{
200 atomic_inc(&adapter->irq_sem);
201 IXGB_WRITE_REG(&adapter->hw, IMC, ~0); 200 IXGB_WRITE_REG(&adapter->hw, IMC, ~0);
202 IXGB_WRITE_FLUSH(&adapter->hw); 201 IXGB_WRITE_FLUSH(&adapter->hw);
203 synchronize_irq(adapter->pdev->irq); 202 synchronize_irq(adapter->pdev->irq);
@@ -211,14 +210,12 @@ ixgb_irq_disable(struct ixgb_adapter *adapter)
211static void 210static void
212ixgb_irq_enable(struct ixgb_adapter *adapter) 211ixgb_irq_enable(struct ixgb_adapter *adapter)
213{ 212{
214 if(atomic_dec_and_test(&adapter->irq_sem)) { 213 u32 val = IXGB_INT_RXT0 | IXGB_INT_RXDMT0 |
215 u32 val = IXGB_INT_RXT0 | IXGB_INT_RXDMT0 | 214 IXGB_INT_TXDW | IXGB_INT_LSC;
216 IXGB_INT_TXDW | IXGB_INT_LSC; 215 if (adapter->hw.subsystem_vendor_id == SUN_SUBVENDOR_ID)
217 if (adapter->hw.subsystem_vendor_id == SUN_SUBVENDOR_ID) 216 val |= IXGB_INT_GPI0;
218 val |= IXGB_INT_GPI0; 217 IXGB_WRITE_REG(&adapter->hw, IMS, val);
219 IXGB_WRITE_REG(&adapter->hw, IMS, val); 218 IXGB_WRITE_FLUSH(&adapter->hw);
220 IXGB_WRITE_FLUSH(&adapter->hw);
221 }
222} 219}
223 220
224int 221int
@@ -305,7 +302,6 @@ ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog)
305 302
306#ifdef CONFIG_IXGB_NAPI 303#ifdef CONFIG_IXGB_NAPI
307 napi_disable(&adapter->napi); 304 napi_disable(&adapter->napi);
308 atomic_set(&adapter->irq_sem, 0);
309#endif 305#endif
310 /* waiting for NAPI to complete can re-enable interrupts */ 306 /* waiting for NAPI to complete can re-enable interrupts */
311 ixgb_irq_disable(adapter); 307 ixgb_irq_disable(adapter);
@@ -594,7 +590,6 @@ ixgb_sw_init(struct ixgb_adapter *adapter)
594 /* enable flow control to be programmed */ 590 /* enable flow control to be programmed */
595 hw->fc.send_xon = 1; 591 hw->fc.send_xon = 1;
596 592
597 atomic_set(&adapter->irq_sem, 1);
598 spin_lock_init(&adapter->tx_lock); 593 spin_lock_init(&adapter->tx_lock);
599 594
600 set_bit(__IXGB_DOWN, &adapter->flags); 595 set_bit(__IXGB_DOWN, &adapter->flags);
@@ -1774,7 +1769,6 @@ ixgb_intr(int irq, void *data)
1774 of the posted write is intentionally left out. 1769 of the posted write is intentionally left out.
1775 */ 1770 */
1776 1771
1777 atomic_inc(&adapter->irq_sem);
1778 IXGB_WRITE_REG(&adapter->hw, IMC, ~0); 1772 IXGB_WRITE_REG(&adapter->hw, IMC, ~0);
1779 __netif_rx_schedule(netdev, &adapter->napi); 1773 __netif_rx_schedule(netdev, &adapter->napi);
1780 } 1774 }