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

Commit 3198e07f authored by Matt Carlson's avatar Matt Carlson Committed by David S. Miller
Browse files

tg3: Fix copper autoneg adv checks



When checking the autoneg advertisements, the driver failed to include
the master and master enable bits for the bcm5701.  This patch fixes the
problem.

Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b546e46f
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -4027,7 +4027,16 @@ static bool tg3_phy_copper_an_config_ok(struct tg3 *tp, u32 *lcladv)
		if (tg3_readphy(tp, MII_CTRL1000, &tg3_ctrl))
			return false;

		if (tgtadv &&
		    (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 ||
		     tp->pci_chip_rev_id == CHIPREV_ID_5701_B0)) {
			tgtadv |= CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER;
			tg3_ctrl &= (ADVERTISE_1000HALF | ADVERTISE_1000FULL |
				     CTL1000_AS_MASTER | CTL1000_ENABLE_MASTER);
		} else {
			tg3_ctrl &= (ADVERTISE_1000HALF | ADVERTISE_1000FULL);
		}

		if (tg3_ctrl != tgtadv)
			return false;
	}