make auto negotiation work on 82562et (thanks mischief!)
the diver used to skip auto negotiation when auto-negotiation enable (bit 12 in command register) was clear. setting the bit now, which makes auto negotiation work. we skip auto negotiation only when it was already enabled and status regiser indicates completion (bit 9).
This commit is contained in:
parent
b41bf07867
commit
f87baec1d0
|
@ -1212,10 +1212,11 @@ reset(Ether* ether)
|
||||||
*/
|
*/
|
||||||
miir(ctlr, phyaddr, 0x01);
|
miir(ctlr, phyaddr, 0x01);
|
||||||
bmsr = miir(ctlr, phyaddr, 0x01);
|
bmsr = miir(ctlr, phyaddr, 0x01);
|
||||||
if((miir(ctlr, phyaddr, 0) & 0x1000) && !(bmsr & 0x0020)){
|
if((miir(ctlr, phyaddr, 0) & 0x1000) && (bmsr & 0x0020))
|
||||||
|
break;
|
||||||
miiw(ctlr, phyaddr, 0x1A, 0x2010);
|
miiw(ctlr, phyaddr, 0x1A, 0x2010);
|
||||||
x = miir(ctlr, phyaddr, 0);
|
x = miir(ctlr, phyaddr, 0);
|
||||||
miiw(ctlr, phyaddr, 0, 0x0200|x);
|
miiw(ctlr, phyaddr, 0, 0x1200|x);
|
||||||
for(i = 0; i < 3000; i++){
|
for(i = 0; i < 3000; i++){
|
||||||
delay(1);
|
delay(1);
|
||||||
if(miir(ctlr, phyaddr, 0x01) & 0x0020)
|
if(miir(ctlr, phyaddr, 0x01) & 0x0020)
|
||||||
|
@ -1231,7 +1232,6 @@ reset(Ether* ether)
|
||||||
bmcr = 0x2000;
|
bmcr = 0x2000;
|
||||||
if(anar & 0x0140)
|
if(anar & 0x0140)
|
||||||
bmcr |= 0x0100;
|
bmcr |= 0x0100;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue