summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-01-18 17:53:44 +0000
committerimp <imp@FreeBSD.org>2010-01-18 17:53:44 +0000
commitd100a17baff8467bab1d16c552191a12ddf0756b (patch)
tree635113b508ef89527b1bdd4b51c6ebf8a0ac3f6f
parentfa634b9a7f5662dfcad7538082fc00927f229817 (diff)
downloadFreeBSD-src-d100a17baff8467bab1d16c552191a12ddf0756b.zip
FreeBSD-src-d100a17baff8467bab1d16c552191a12ddf0756b.tar.gz
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.
-rw-r--r--sys/dev/cs/if_csreg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/cs/if_csreg.h b/sys/dev/cs/if_csreg.h
index 114800e..be41e5c 100644
--- a/sys/dev/cs/if_csreg.h
+++ b/sys/dev/cs/if_csreg.h
@@ -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));
}
OpenPOWER on IntegriCloud