aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/tg3.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index d8691224b0b3..de898f175d73 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -1042,17 +1042,26 @@ static void tg3_frob_aux_power(struct tg3 *tp)
1042 udelay(100); 1042 udelay(100);
1043 } else { 1043 } else {
1044 u32 no_gpio2; 1044 u32 no_gpio2;
1045 u32 grc_local_ctrl; 1045 u32 grc_local_ctrl = 0;
1046 1046
1047 if (tp_peer != tp && 1047 if (tp_peer != tp &&
1048 (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) 1048 (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0)
1049 return; 1049 return;
1050 1050
1051 /* Workaround to prevent overdrawing Amps. */
1052 if (GET_ASIC_REV(tp->pci_chip_rev_id) ==
1053 ASIC_REV_5714) {
1054 grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3;
1055 tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl |
1056 grc_local_ctrl);
1057 udelay(100);
1058 }
1059
1051 /* On 5753 and variants, GPIO2 cannot be used. */ 1060 /* On 5753 and variants, GPIO2 cannot be used. */
1052 no_gpio2 = tp->nic_sram_data_cfg & 1061 no_gpio2 = tp->nic_sram_data_cfg &
1053 NIC_SRAM_DATA_CFG_NO_GPIO2; 1062 NIC_SRAM_DATA_CFG_NO_GPIO2;
1054 1063
1055 grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | 1064 grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 |
1056 GRC_LCLCTRL_GPIO_OE1 | 1065 GRC_LCLCTRL_GPIO_OE1 |
1057 GRC_LCLCTRL_GPIO_OE2 | 1066 GRC_LCLCTRL_GPIO_OE2 |
1058 GRC_LCLCTRL_GPIO_OUTPUT1 | 1067 GRC_LCLCTRL_GPIO_OUTPUT1 |
@@ -1297,7 +1306,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state)
1297 tg3_writephy(tp, MII_TG3_EXT_CTRL, 1306 tg3_writephy(tp, MII_TG3_EXT_CTRL,
1298 MII_TG3_EXT_CTRL_FORCE_LED_OFF); 1307 MII_TG3_EXT_CTRL_FORCE_LED_OFF);
1299 tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); 1308 tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2);
1300 tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); 1309 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700)
1310 tg3_writephy(tp, MII_BMCR, BMCR_PDOWN);
1301 } 1311 }
1302 } 1312 }
1303 1313