summaryrefslogtreecommitdiffstats
path: root/sys/dev/siba/siba_core.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2010-03-11 08:03:56 +0000
committerthompsa <thompsa@FreeBSD.org>2010-03-11 08:03:56 +0000
commitc5122bd6a11c8470dc3a8ad06213f4d24ee45e44 (patch)
treedb75c86ba235eab58b962a56889a322387a007dd /sys/dev/siba/siba_core.c
parent4966ff62b9076d5f0eee7c11512c04fd67f098d9 (diff)
downloadFreeBSD-src-c5122bd6a11c8470dc3a8ad06213f4d24ee45e44.zip
FreeBSD-src-c5122bd6a11c8470dc3a8ad06213f4d24ee45e44.tar.gz
Revert r204992 and just wrap it all in ifdef INVARIANTS to fix the debug and
non-debug cases.
Diffstat (limited to 'sys/dev/siba/siba_core.c')
-rw-r--r--sys/dev/siba/siba_core.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/siba/siba_core.c b/sys/dev/siba/siba_core.c
index 99a9fe9..979ac14 100644
--- a/sys/dev/siba/siba_core.c
+++ b/sys/dev/siba/siba_core.c
@@ -2031,11 +2031,13 @@ siba_pcie_mdio_write(struct siba_pci *spc, uint8_t device, uint8_t address,
uint32_t
siba_dma_translation(device_t dev)
{
+#ifdef INVARIANTS
+ struct siba_dev_softc *sd = device_get_ivars(dev);
+ struct siba_softc *siba = sd->sd_bus;
- KASSERT(device_get_ivars(dev)->sd_bus->siba_type == SIBA_TYPE_PCI,
- ("unsupported bustype %d\n",
- device_get_ivars(dev)->sd_bus->siba_type));
-
+ KASSERT(siba->siba_type == SIBA_TYPE_PCI,
+ ("unsupported bustype %d\n", siba->siba_type));
+#endif
return (SIBA_PCI_DMA);
}
OpenPOWER on IntegriCloud