aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2005-12-14 00:08:58 -0500
committerDavid S. Miller <davem@davemloft.net>2005-12-14 00:08:58 -0500
commit6a9eba15f51c56da637e45ea1316eaa2a848986a (patch)
treefb18f2580e6aaa2c14c042b51e80bc8eb6b9806b /drivers/net/tg3.c
parent381291b7d3e17ac966498312dc571dcca1b93efc (diff)
[TG3]: Fix suspend and resume
Fix tg3_suspend() and tg3_resume() by clearing and setting the TG3_FLAG_INIT_COMPLETE flag when appropriate. tg3_set_power_state() looks at TG3_FLAG_INIT_COMPLETE on the peer device to determine when to appropriately switch to aux power. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index dabc39befd3..6b7ab4b7275 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -10826,12 +10826,14 @@ static int tg3_suspend(struct pci_dev *pdev, pm_message_t state)
10826 10826
10827 tg3_full_lock(tp, 0); 10827 tg3_full_lock(tp, 0);
10828 tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); 10828 tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
10829 tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE;
10829 tg3_full_unlock(tp); 10830 tg3_full_unlock(tp);
10830 10831
10831 err = tg3_set_power_state(tp, pci_choose_state(pdev, state)); 10832 err = tg3_set_power_state(tp, pci_choose_state(pdev, state));
10832 if (err) { 10833 if (err) {
10833 tg3_full_lock(tp, 0); 10834 tg3_full_lock(tp, 0);
10834 10835
10836 tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE;
10835 tg3_init_hw(tp); 10837 tg3_init_hw(tp);
10836 10838
10837 tp->timer.expires = jiffies + tp->timer_offset; 10839 tp->timer.expires = jiffies + tp->timer_offset;
@@ -10865,6 +10867,7 @@ static int tg3_resume(struct pci_dev *pdev)
10865 10867
10866 tg3_full_lock(tp, 0); 10868 tg3_full_lock(tp, 0);
10867 10869
10870 tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE;
10868 tg3_init_hw(tp); 10871 tg3_init_hw(tp);
10869 10872
10870 tp->timer.expires = jiffies + tp->timer_offset; 10873 tp->timer.expires = jiffies + tp->timer_offset;