Fix a legacy issue. The offset for reading the MAC address is 0 using

bus space, not iosize which is what it was when using inb().
This commit is contained in:
Paul Richards 2000-12-29 04:41:52 +00:00
parent 97948d2dee
commit b31d9f17b1

View File

@ -156,6 +156,7 @@ write_csr(struct lnc_softc *sc, u_short port, u_short val)
bus_space_write_2(sc->lnc_btag, sc->lnc_bhandle, sc->rdp, val);
}
#define inb(port) bus_space_read_1(sc->lnc_btag, sc->lnc_bhandle, port)
#define inw(port) bus_space_read_2(sc->lnc_btag, sc->lnc_bhandle, port)
#define outw(port, val) bus_space_write_2(sc->lnc_btag, sc->lnc_bhandle, port, val)
@ -881,7 +882,7 @@ lnc_attach_common(device_t dev)
/* Extract MAC address from PROM */
for (i = 0; i < ETHER_ADDR_LEN; i++)
sc->arpcom.ac_enaddr[i] = inb(sc->iobase + (i * skip));
sc->arpcom.ac_enaddr[i] = inb(i * skip);
/*
* XXX -- should check return status of if_attach