|
@@ -3595,18 +3595,17 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)
|
|
|
if (err)
|
|
|
goto done;
|
|
|
|
|
|
- if (tp->phy_flags & TG3_PHYFLG_10_100_ONLY)
|
|
|
- goto done;
|
|
|
-
|
|
|
- new_adv = ethtool_adv_to_mii_ctrl1000_t(advertise);
|
|
|
+ if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
|
|
|
+ new_adv = ethtool_adv_to_mii_ctrl1000_t(advertise);
|
|
|
|
|
|
- if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 ||
|
|
|
- tp->pci_chip_rev_id == CHIPREV_ID_5701_B0)
|
|
|
- new_adv |= CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER;
|
|
|
+ if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 ||
|
|
|
+ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0)
|
|
|
+ new_adv |= CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER;
|
|
|
|
|
|
- err = tg3_writephy(tp, MII_CTRL1000, new_adv);
|
|
|
- if (err)
|
|
|
- goto done;
|
|
|
+ err = tg3_writephy(tp, MII_CTRL1000, new_adv);
|
|
|
+ if (err)
|
|
|
+ goto done;
|
|
|
+ }
|
|
|
|
|
|
if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
|
|
|
goto done;
|