aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/siba
diff options
context:
space:
mode:
authorAndrew Thompson <thompsa@FreeBSD.org>2010-03-11 08:03:56 +0000
committerAndrew Thompson <thompsa@FreeBSD.org>2010-03-11 08:03:56 +0000
commit5bbc70dde93176747101defd750ee23c5d4fc9bc (patch)
treedb75c86ba235eab58b962a56889a322387a007dd /sys/dev/siba
parent7e0e1004f34ba249d8f0aa449068379e3fdc0571 (diff)
Notes
Diffstat (limited to 'sys/dev/siba')
-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 99a9fe9bfb6c..979ac1406a65 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);
}