diff options
-rw-r--r-- | drivers/net/tg3.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 26aa37aa531f..d2439b85a790 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -7687,21 +7687,11 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
7687 | */ | 7687 | */ |
7688 | static int tg3_init_hw(struct tg3 *tp, int reset_phy) | 7688 | static int tg3_init_hw(struct tg3 *tp, int reset_phy) |
7689 | { | 7689 | { |
7690 | int err; | ||
7691 | |||
7692 | /* Force the chip into D0. */ | ||
7693 | err = tg3_set_power_state(tp, PCI_D0); | ||
7694 | if (err) | ||
7695 | goto out; | ||
7696 | |||
7697 | tg3_switch_clocks(tp); | 7690 | tg3_switch_clocks(tp); |
7698 | 7691 | ||
7699 | tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); | 7692 | tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); |
7700 | 7693 | ||
7701 | err = tg3_reset_hw(tp, reset_phy); | 7694 | return tg3_reset_hw(tp, reset_phy); |
7702 | |||
7703 | out: | ||
7704 | return err; | ||
7705 | } | 7695 | } |
7706 | 7696 | ||
7707 | #define TG3_STAT_ADD32(PSTAT, REG) \ | 7697 | #define TG3_STAT_ADD32(PSTAT, REG) \ |
@@ -8016,13 +8006,11 @@ static int tg3_open(struct net_device *dev) | |||
8016 | 8006 | ||
8017 | netif_carrier_off(tp->dev); | 8007 | netif_carrier_off(tp->dev); |
8018 | 8008 | ||
8019 | tg3_full_lock(tp, 0); | ||
8020 | |||
8021 | err = tg3_set_power_state(tp, PCI_D0); | 8009 | err = tg3_set_power_state(tp, PCI_D0); |
8022 | if (err) { | 8010 | if (err) |
8023 | tg3_full_unlock(tp); | ||
8024 | return err; | 8011 | return err; |
8025 | } | 8012 | |
8013 | tg3_full_lock(tp, 0); | ||
8026 | 8014 | ||
8027 | tg3_disable_ints(tp); | 8015 | tg3_disable_ints(tp); |
8028 | tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; | 8016 | tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE; |