diff options
| author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-05-12 18:25:24 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-05-12 18:25:24 +0200 |
| commit | 8020743579ed7398bf0c61e5723d827d41d70475 (patch) | |
| tree | f01aec151c61ffb6417ac97b600710b4655a81d3 | |
| parent | 29ece7fda4a8e4eea62eabcfbd8fd04bef613742 (diff) | |
| download | plan9front-8020743579ed7398bf0c61e5723d827d41d70475.tar.xz | |
ether8169: do phywakeup magic only for specific mac versions (from openbsd)
| -rw-r--r-- | sys/src/9/pc/ether8169.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/src/9/pc/ether8169.c b/sys/src/9/pc/ether8169.c index 51377f454..cf9ebdf08 100644 --- a/sys/src/9/pc/ether8169.c +++ b/sys/src/9/pc/ether8169.c @@ -119,6 +119,7 @@ enum { /* Tcr */ Macv27 = 0x2c800000, /* RTL8111e */ Macv28 = 0x2c000000, /* RTL8111/8168B */ Macv29 = 0x40800000, /* RTL8101/8102E */ + Macv30 = 0x24000000, /* RTL8101E? (untested) */ Ifg0 = 0x01000000, /* Interframe Gap 0 */ Ifg1 = 0x02000000, /* Interframe Gap 1 */ }; @@ -392,7 +393,14 @@ rtl8169mii(Ctlr* ctlr) /* * PHY wakeup */ - csr8w(ctlr, Pmch, csr8r(ctlr, Pmch) | 0x80); + switch(ctlr->macv){ + case Macv25: + case Macv28: + case Macv29: + case Macv30: + csr8w(ctlr, Pmch, csr8r(ctlr, Pmch) | 0x80); + break; + } rtl8169miimiw(ctlr->mii, 1, 0x1f, 0); rtl8169miimiw(ctlr->mii, 1, 0x0e, 0); @@ -1031,6 +1039,7 @@ vetmacv(Ctlr *ctlr, uint *macv) case Macv27: case Macv28: case Macv29: + case Macv30: break; } return 0; |
