Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN
@ 2016-11-09 21:41 Tyler Baicar
  2016-11-10  6:19 ` Neftin, Sasha
  0 siblings, 1 reply; 13+ messages in thread
From: Tyler Baicar @ 2016-11-09 21:41 UTC (permalink / raw)
  To: intel-wired-lan

Move IRQ free code so that it will happen regardless of the
__E1000_DOWN bit. Currently the e1000e driver only releases its IRQ
if the __E1000_DOWN bit is cleared. This is not sufficient because
it is possible for __E1000_DOWN to be set without releasing the IRQ.
In such a situation, we will hit a kernel bug later in e1000_remove
because the IRQ still has action since it was never freed. A
secondary bus reset can cause this case to happen.

Signed-off-by: Tyler Baicar <tbaicar@codeaurora.org>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 7017281..36cfcb0 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -4679,12 +4679,13 @@ int e1000e_close(struct net_device *netdev)
 
 	if (!test_bit(__E1000_DOWN, &adapter->state)) {
 		e1000e_down(adapter, true);
-		e1000_free_irq(adapter);
 
 		/* Link status message must follow this format */
 		pr_info("%s NIC Link is Down\n", adapter->netdev->name);
 	}
 
+	e1000_free_irq(adapter);
+
 	napi_disable(&adapter->napi);
 
 	e1000e_free_tx_resources(adapter->tx_ring);
-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-12-04  7:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-09 21:41 [Intel-wired-lan] [PATCH v2] e1000e: free IRQ regardless of __E1000_DOWN Tyler Baicar
2016-11-10  6:19 ` Neftin, Sasha
2016-11-10 22:35   ` Baicar, Tyler
2016-11-13  8:34     ` Neftin, Sasha
2016-11-13  9:25       ` Neftin, Sasha
2016-11-15 21:50         ` Baicar, Tyler
     [not found]           ` <630A6B92B7EDEB45A87E20D3D286660153E3B481@hasmsx109.ger.corp.intel.com>
2016-11-17 13:17             ` [Intel-wired-lan] Fwd: " Neftin, Sasha
2016-11-17 13:27             ` [Intel-wired-lan] " Neftin, Sasha
     [not found]             ` <82260f85-2f8d-20e7-4f52-86b156aff96f@intel.com>
     [not found]               ` <7a5a4fdc-6086-4bd8-cb95-00d4ec2c0817@intel.com>
2016-11-17 13:49                 ` [Intel-wired-lan] Fwd: FW: " Neftin, Sasha
2016-11-17 13:31       ` [Intel-wired-lan] " Neftin, Sasha
2016-11-21 20:40         ` Baicar, Tyler
2016-12-02 17:02           ` Baicar, Tyler
2016-12-04  7:35             ` Neftin, Sasha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox