summaryrefslogtreecommitdiffstats
path: root/sys/dev/ed
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>1999-10-31 09:05:20 +0000
committernyan <nyan@FreeBSD.org>1999-10-31 09:05:20 +0000
commitfc563ce1d4415a58762ac69c2474ceaca5c354cb (patch)
tree44030cfec8475e746b8cac9f636626c15d716ad0 /sys/dev/ed
parent42ae38ffd6f2fe1836ee15bcc2b144bf88b09ae1 (diff)
downloadFreeBSD-src-fc563ce1d4415a58762ac69c2474ceaca5c354cb.zip
FreeBSD-src-fc563ce1d4415a58762ac69c2474ceaca5c354cb.tar.gz
Change Linksys registers base/offset.
On NEC PC-98, asic_addr != nic_addr + 0x10. Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
Diffstat (limited to 'sys/dev/ed')
-rw-r--r--sys/dev/ed/if_ed.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index ba799c4..de14e09 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -906,16 +906,18 @@ ed_get_Linksys(sc)
int i;
/*
- * 0x14-0x19 : Physical Address Register 0-5 (PAR0-PAR5)
- * 0x1A : Card ID Register (CIR)
- * 0x1B : Check Sum Register (SR)
+ * Linksys registers(offset from ASIC base)
+ *
+ * 0x04-0x09 : Physical Address Register 0-5 (PAR0-PAR5)
+ * 0x0A : Card ID Register (CIR)
+ * 0x0B : Check Sum Register (SR)
*/
- for (sum = 0, i = 0x14; i < 0x1c; i++)
- sum += inb(sc->nic_addr + i);
+ for (sum = 0, i = 0x04; i < 0x0c; i++)
+ sum += inb(sc->asic_addr + i);
if (sum != 0xff)
return (0); /* invalid DL10019C */
for (i = 0; i < ETHER_ADDR_LEN; i++) {
- sc->arpcom.ac_enaddr[i] = inb(sc->nic_addr + 0x14 + i);
+ sc->arpcom.ac_enaddr[i] = inb(sc->asic_addr + 0x04 + i);
}
if (bcmp(sc->arpcom.ac_enaddr, LinksysOUI1, sizeof(LinksysOUI1)) &&
bcmp(sc->arpcom.ac_enaddr, LinksysOUI2, sizeof(LinksysOUI2)))
OpenPOWER on IntegriCloud