summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpaul <paul@FreeBSD.org>2000-12-29 04:41:52 +0000
committerpaul <paul@FreeBSD.org>2000-12-29 04:41:52 +0000
commit8cccb2b798681406dea4c3ec1671b76c9efb9935 (patch)
tree0feb4a714b59e72fbbc250cc0c01481f43a9be8e /sys
parent0f7bbc08d08430dc04fd1ae9a6846d169065eb1e (diff)
downloadFreeBSD-src-8cccb2b798681406dea4c3ec1671b76c9efb9935.zip
FreeBSD-src-8cccb2b798681406dea4c3ec1671b76c9efb9935.tar.gz
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().
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/lnc/if_lnc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index ce96cb9..1444556 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -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
OpenPOWER on IntegriCloud