e1000: use disable_hardirq() for e1000_netpoll()
authorWANG Cong <xiyou.wangcong@gmail.com>
Sat, 10 Dec 2016 22:22:42 +0000 (14:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Dec 2016 04:31:19 +0000 (23:31 -0500)
In commit 02cea3958664 ("genirq: Provide disable_hardirq()")
Peter introduced disable_hardirq() for netpoll, but it is forgotten
to use it for e1000.

This patch changes disable_irq() to disable_hardirq() for e1000.

Reported-by: Dave Jones <davej@codemonkey.org.uk>
Suggested-by: Sabrina Dubroca <sd@queasysnail.net>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/e1000/e1000_main.c
drivers/net/ethernet/intel/e1000e/netdev.c

index 33076fa9800298aa4fb4a19d1feae234a5c20b04..93fc6c67306bf507dc65579f45ec44917df1d096 100644 (file)
@@ -5255,8 +5255,8 @@ static void e1000_netpoll(struct net_device *netdev)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
 
-       disable_irq(adapter->pdev->irq);
-       e1000_intr(adapter->pdev->irq, netdev);
+       if (disable_hardirq(adapter->pdev->irq))
+               e1000_intr(adapter->pdev->irq, netdev);
        enable_irq(adapter->pdev->irq);
 }
 #endif
index 8759d9236930fd8942b76c176ff4f4d4137b7555..ffcf35af48814f44312561536090635a69473230 100644 (file)
@@ -6755,13 +6755,13 @@ static void e1000_netpoll(struct net_device *netdev)
                e1000_intr_msix(adapter->pdev->irq, netdev);
                break;
        case E1000E_INT_MODE_MSI:
-               disable_irq(adapter->pdev->irq);
-               e1000_intr_msi(adapter->pdev->irq, netdev);
+               if (disable_hardirq(adapter->pdev->irq))
+                       e1000_intr_msi(adapter->pdev->irq, netdev);
                enable_irq(adapter->pdev->irq);
                break;
        default:                /* E1000E_INT_MODE_LEGACY */
-               disable_irq(adapter->pdev->irq);
-               e1000_intr(adapter->pdev->irq, netdev);
+               if (disable_hardirq(adapter->pdev->irq))
+                       e1000_intr(adapter->pdev->irq, netdev);
                enable_irq(adapter->pdev->irq);
                break;
        }