Commit 1941208c authored by David S. Miller's avatar David S. Miller

[TG3]: Fix early chip programming in tg3_setup_copper_phy().

1) First action must be to set MAC_EVENT to zero.
2) Do not forget to clear MI_COMPLETION/LNKSTATE_CHANGED
   status bits in MAC_STATUS register.

This fixes the bug wherein the link does not come up at all
at the first ifup done after tg3 module load.
parent f9fa153e
......@@ -1245,9 +1245,13 @@ static int tg3_setup_copper_phy(struct tg3 *tp)
u8 current_duplex;
int i, err;
tw32(MAC_EVENT, 0);
tw32(MAC_STATUS,
(MAC_STATUS_SYNC_CHANGED |
MAC_STATUS_CFG_CHANGED));
MAC_STATUS_CFG_CHANGED |
MAC_STATUS_MI_COMPLETION |
MAC_STATUS_LNKSTATE_CHANGED));
tr32(MAC_STATUS);
udelay(40);
......
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