Commit daee5598 authored by Alexander Duyck's avatar Alexander Duyck Committed by Jeff Kirsher

e1000e: Drop unnecessary __E1000_DOWN bit twiddling

Since we no longer check for __E1000_DOWN in e1000e_close we can drop the
spot where we were restoring the bit. This saves us a bit of unnecessary
complexity.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@linux.intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent a7023819
...@@ -7591,14 +7591,12 @@ static void e1000_remove(struct pci_dev *pdev) ...@@ -7591,14 +7591,12 @@ static void e1000_remove(struct pci_dev *pdev)
{ {
struct net_device *netdev = pci_get_drvdata(pdev); struct net_device *netdev = pci_get_drvdata(pdev);
struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_adapter *adapter = netdev_priv(netdev);
bool down = test_bit(__E1000_DOWN, &adapter->state);
e1000e_ptp_remove(adapter); e1000e_ptp_remove(adapter);
/* The timers may be rescheduled, so explicitly disable them /* The timers may be rescheduled, so explicitly disable them
* from being rescheduled. * from being rescheduled.
*/ */
if (!down)
set_bit(__E1000_DOWN, &adapter->state); set_bit(__E1000_DOWN, &adapter->state);
del_timer_sync(&adapter->phy_info_timer); del_timer_sync(&adapter->phy_info_timer);
...@@ -7619,9 +7617,6 @@ static void e1000_remove(struct pci_dev *pdev) ...@@ -7619,9 +7617,6 @@ static void e1000_remove(struct pci_dev *pdev)
} }
} }
/* Don't lie to e1000_close() down the road. */
if (!down)
clear_bit(__E1000_DOWN, &adapter->state);
unregister_netdev(netdev); unregister_netdev(netdev);
if (pci_dev_run_wake(pdev)) if (pci_dev_run_wake(pdev))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment