Make 8139C+ work again which was broken since rev 1.68.
Ever since rev 1.68 re(4) checks the validity of link in re_start. But rlphy(4) got a garbled data due to a different bit layout used on 8139C+ and it couldn't report correct link state. To fix it, ignore BMCR_LOOP and BMCR_ISO bits which have different meanings on 8139C+. I think this also make dhclient(8) work on 8139C+. Reported by: Gerrit Kuehn <gerrit AT pmp DOT uni-hannover DOT de> Tested by: Gerrit Kuehn <gerrit AT pmp DOT uni-hannover DOT de>
This commit is contained in:
parent
0f9868def9
commit
baa1277289
@ -541,6 +541,10 @@ re_miibus_readreg(dev, phy, reg)
|
||||
return (0);
|
||||
}
|
||||
rval = CSR_READ_2(sc, re8139_reg);
|
||||
if (sc->rl_type == RL_8139CPLUS && re8139_reg == RL_BMCR) {
|
||||
/* 8139C+ has different bit layout. */
|
||||
rval &= ~(BMCR_LOOP | BMCR_ISO);
|
||||
}
|
||||
return (rval);
|
||||
}
|
||||
|
||||
@ -567,6 +571,10 @@ re_miibus_writereg(dev, phy, reg, data)
|
||||
switch (reg) {
|
||||
case MII_BMCR:
|
||||
re8139_reg = RL_BMCR;
|
||||
if (sc->rl_type == RL_8139CPLUS) {
|
||||
/* 8139C+ has different bit layout. */
|
||||
data &= ~(BMCR_LOOP | BMCR_ISO);
|
||||
}
|
||||
break;
|
||||
case MII_BMSR:
|
||||
re8139_reg = RL_BMSR;
|
||||
|
Loading…
Reference in New Issue
Block a user