Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f272096 authored by Matt Carlson's avatar Matt Carlson Committed by David S. Miller
Browse files

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: default avatarMatt Carlson <mcarlson@broadcom.com>
Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
Reviewed-by: default avatarBenjamin Li <benli@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c48e074c
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -3595,9 +3595,7 @@ 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;

	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 ||
@@ -3607,6 +3605,7 @@ static int tg3_phy_autoneg_cfg(struct tg3 *tp, u32 advertise, u32 flowctrl)
		err = tg3_writephy(tp, MII_CTRL1000, new_adv);
		if (err)
			goto done;
	}

	if (!(tp->phy_flags & TG3_PHYFLG_EEE_CAP))
		goto done;