igb: move get_hw_control within igb_resume.
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 6 Feb 2009 23:21:10 +0000 (23:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Feb 2009 10:43:14 +0000 (02:43 -0800)
Move igb_get_hw_control up so that it is called just after the reset in
igb_resume.  This notifies the HW sooner that the driver is reassuming
control of the device.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/igb/igb_main.c

index 56c14557cea3f6623367bbd19e8d97905d6b08ec..accab3f7357e4e4ae1c55100c3ac756db3cb03b1 100644 (file)
@@ -4341,6 +4341,11 @@ static int igb_resume(struct pci_dev *pdev)
        /* e1000_power_up_phy(adapter); */
 
        igb_reset(adapter);
+
+       /* let the f/w know that the h/w is now under the control of the
+        * driver. */
+       igb_get_hw_control(adapter);
+
        wr32(E1000_WUS, ~0);
 
        if (netif_running(netdev)) {
@@ -4351,10 +4356,6 @@ static int igb_resume(struct pci_dev *pdev)
 
        netif_device_attach(netdev);
 
-       /* let the f/w know that the h/w is now under the control of the
-        * driver. */
-       igb_get_hw_control(adapter);
-
        return 0;
 }
 #endif