Add a warning if we're inw'ing from an odd address. This could happen

due to a bug and might be the real basis for the cardbus workaround
hack.
This commit is contained in:
Warner Losh 2010-01-18 17:53:44 +00:00
parent 9103854246
commit 73f0e8eb9c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=202581

View File

@ -539,6 +539,8 @@
static __inline uint16_t
cs_inw(struct cs_softc *sc, int off)
{
if (off & 1)
device_printf(sc->dev, "BUG: inw to an odd address.\n");
return ((inb(sc->nic_addr + off) & 0xff) |
(inb(sc->nic_addr + off + 1) << 8));
}