Commit 0a9140cf authored by Matt Carlson's avatar Matt Carlson Committed by David S. Miller

tg3: Delay mdio bus init until fw finishes

The device firmware uses the MDIO bus during early setup.  If the driver
modifies the MDIO bus configuration while it is in use by the firmware,
any number of bad things can happen.  This patch delays MDIO setup until
after the firmware posts its magic signature, signifying initialization
is complete.
Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3df9a51
...@@ -6348,14 +6348,14 @@ static int tg3_chip_reset(struct tg3 *tp) ...@@ -6348,14 +6348,14 @@ static int tg3_chip_reset(struct tg3 *tp)
tw32_f(MAC_MODE, 0); tw32_f(MAC_MODE, 0);
udelay(40); udelay(40);
tg3_mdio_start(tp);
tg3_ape_unlock(tp, TG3_APE_LOCK_GRC); tg3_ape_unlock(tp, TG3_APE_LOCK_GRC);
err = tg3_poll_fw(tp); err = tg3_poll_fw(tp);
if (err) if (err)
return err; return err;
tg3_mdio_start(tp);
if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) && if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) &&
tp->pci_chip_rev_id != CHIPREV_ID_5750_A0) { tp->pci_chip_rev_id != CHIPREV_ID_5750_A0) {
val = tr32(0x7c00); val = tr32(0x7c00);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment