diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/tg3.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index dc41c055ebb5..58740428dd07 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -64,8 +64,8 @@ | |||
64 | 64 | ||
65 | #define DRV_MODULE_NAME "tg3" | 65 | #define DRV_MODULE_NAME "tg3" |
66 | #define PFX DRV_MODULE_NAME ": " | 66 | #define PFX DRV_MODULE_NAME ": " |
67 | #define DRV_MODULE_VERSION "3.79" | 67 | #define DRV_MODULE_VERSION "3.80" |
68 | #define DRV_MODULE_RELDATE "July 18, 2007" | 68 | #define DRV_MODULE_RELDATE "August 2, 2007" |
69 | 69 | ||
70 | #define TG3_DEF_MAC_MODE 0 | 70 | #define TG3_DEF_MAC_MODE 0 |
71 | #define TG3_DEF_RX_MODE 0 | 71 | #define TG3_DEF_RX_MODE 0 |
@@ -12111,6 +12111,12 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) | |||
12111 | struct tg3 *tp = netdev_priv(dev); | 12111 | struct tg3 *tp = netdev_priv(dev); |
12112 | int err; | 12112 | int err; |
12113 | 12113 | ||
12114 | /* PCI register 4 needs to be saved whether netif_running() or not. | ||
12115 | * MSI address and data need to be saved if using MSI and | ||
12116 | * netif_running(). | ||
12117 | */ | ||
12118 | pci_save_state(pdev); | ||
12119 | |||
12114 | if (!netif_running(dev)) | 12120 | if (!netif_running(dev)) |
12115 | return 0; | 12121 | return 0; |
12116 | 12122 | ||
@@ -12130,9 +12136,6 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state) | |||
12130 | tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; | 12136 | tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; |
12131 | tg3_full_unlock(tp); | 12137 | tg3_full_unlock(tp); |
12132 | 12138 | ||
12133 | /* Save MSI address and data for resume. */ | ||
12134 | pci_save_state(pdev); | ||
12135 | |||
12136 | err = tg3_set_power_state(tp, pci_choose_state(pdev, state)); | 12139 | err = tg3_set_power_state(tp, pci_choose_state(pdev, state)); |
12137 | if (err) { | 12140 | if (err) { |
12138 | tg3_full_lock(tp, 0); | 12141 | tg3_full_lock(tp, 0); |
@@ -12160,11 +12163,11 @@ static int tg3_resume(struct pci_dev *pdev) | |||
12160 | struct tg3 *tp = netdev_priv(dev); | 12163 | struct tg3 *tp = netdev_priv(dev); |
12161 | int err; | 12164 | int err; |
12162 | 12165 | ||
12166 | pci_restore_state(tp->pdev); | ||
12167 | |||
12163 | if (!netif_running(dev)) | 12168 | if (!netif_running(dev)) |
12164 | return 0; | 12169 | return 0; |
12165 | 12170 | ||
12166 | pci_restore_state(tp->pdev); | ||
12167 | |||
12168 | err = tg3_set_power_state(tp, PCI_D0); | 12171 | err = tg3_set_power_state(tp, PCI_D0); |
12169 | if (err) | 12172 | if (err) |
12170 | return err; | 12173 | return err; |