ether82563: fix phyerrata()

This commit is contained in:
cinap_lenrek 2012-12-31 21:50:08 +01:00
parent 6cadd03bbe
commit b821a76824

View file

@ -1299,13 +1299,13 @@ phywrite(Ctlr *c, uint phyno, uint reg, ushort v)
static void
phyerrata(Ether *e, Ctlr *c)
{
if(e->mbps == 0)
if(e->mbps == 0){
if(c->phyerrata == 0){
c->phyerrata++;
phywrite(c, 1, Phyprst, Prst); /* try a port reset */
print("%s: phy port reset\n", cname(c));
}
else
}else
c->phyerrata = 0;
}