提交 4f272096 编写于 作者: M Matt Carlson 提交者: David S. Miller

tg3: Enable EEE support for capable 10/100 devs

There are some devices in the 57765 ASIC rev that are EEE capable.
Unfortunately the EEE setup code only gets executed if the device is
gigabit capable.  This patch fixes the problem.
Signed-off-by: NMatt Carlson <mcarlson@broadcom.com>
Reviewed-by: NMichael Chan <mchan@broadcom.com>
Reviewed-by: NBenjamin Li <benli@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c48e074c
...@@ -3595,18 +3595,17 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl) ...@@ -3595,18 +3595,17 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)
if (err) if (err)
goto done; goto done;
if (tp->phy_flags & TG3_PHYFLG_10_100_ONLY) if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
goto done; new_adv = ethtool_adv_to_mii_ctrl1000_t(advertise);
new_adv = ethtool_adv_to_mii_ctrl1000_t(advertise);
if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 ||
tp->pci_chip_rev_id == CHIPREV_ID_5701_B0) tp->pci_chip_rev_id == CHIPREV_ID_5701_B0)
new_adv |= CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER; new_adv |= CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER;
err = tg3_writephy(tp, MII_CTRL1000, new_adv); err = tg3_writephy(tp, MII_CTRL1000, new_adv);
if (err) if (err)
goto done; goto done;
}
if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP)) if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
goto done; goto done;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册