aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sbsh
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2003-09-02 17:30:40 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2003-09-02 17:30:40 +0000
commite27951b29c565206b57c8cdbc2ac344485c2f4f5 (patch)
tree1a7743437055722d93fce73b145dde1eb1915e7f /sys/dev/sbsh
parent56802c46e21d0c72a5f0550f2cb1f2a155ceb633 (diff)
Notes
Diffstat (limited to 'sys/dev/sbsh')
-rw-r--r--sys/dev/sbsh/if_sbsh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/sbsh/if_sbsh.c b/sys/dev/sbsh/if_sbsh.c
index 2a1258b6e9b0..9678e1032ed6 100644
--- a/sys/dev/sbsh/if_sbsh.c
+++ b/sys/dev/sbsh/if_sbsh.c
@@ -227,7 +227,7 @@ sbsh_attach(device_t dev)
sc = device_get_softc(dev);
unit = device_get_unit(dev);
- rid = PCIR_MAPS + 4;
+ rid = PCIR_BAR(1);
sc->mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid,
0, ~0, 4096, RF_ACTIVE);
@@ -244,7 +244,7 @@ sbsh_attach(device_t dev)
if (sc->irq_res == NULL) {
printf("sbsh%d: couldn't map interrupt\n", unit);
bus_release_resource(dev, SYS_RES_MEMORY,
- PCIR_MAPS + 4, sc->mem_res);
+ PCIR_BAR(1), sc->mem_res);
error = ENXIO;
goto fail;
}
@@ -257,7 +257,7 @@ sbsh_attach(device_t dev)
if (error) {
bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res);
bus_release_resource(dev, SYS_RES_MEMORY,
- PCIR_MAPS + 4, sc->mem_res);
+ PCIR_BAR(1), sc->mem_res);
printf("sbsh%d: couldn't set up irq\n", unit);
goto fail;
}
@@ -304,7 +304,7 @@ sbsh_detach(device_t dev)
bus_teardown_intr(dev, sc->irq_res, sc->intr_hand);
bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res);
- bus_release_resource(dev, SYS_RES_MEMORY, PCIR_MAPS + 4, sc->mem_res);
+ bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(1), sc->mem_res);
splx(s);
return (0);