summaryrefslogtreecommitdiffstats
path: root/sys/dev/iir
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2007-06-17 05:55:54 +0000
committerscottl <scottl@FreeBSD.org>2007-06-17 05:55:54 +0000
commitff584e70faf04177b3d2b50035e4e0031ad7e655 (patch)
tree1f069a0af9a8c28e09089c8dc789bcd435a94cce /sys/dev/iir
parent001175ac64443d5853311173ea76dffb961d6c9f (diff)
downloadFreeBSD-src-ff584e70faf04177b3d2b50035e4e0031ad7e655.zip
FreeBSD-src-ff584e70faf04177b3d2b50035e4e0031ad7e655.tar.gz
Prepare for future integration between CAM and newbus. xpt_bus_register
now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE.
Diffstat (limited to 'sys/dev/iir')
-rw-r--r--sys/dev/iir/iir.c2
-rw-r--r--sys/dev/iir/iir.h1
-rw-r--r--sys/dev/iir/iir_pci.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/iir/iir.c b/sys/dev/iir/iir.c
index b58306b..34a801c 100644
--- a/sys/dev/iir/iir.c
+++ b/sys/dev/iir/iir.c
@@ -505,7 +505,7 @@ iir_attach(struct gdt_softc *gdt)
gdt, gdt->sc_hanum, &Giant,
/*untagged*/1,
/*tagged*/GDT_MAXCMDS, devq);
- if (xpt_bus_register(gdt->sims[i], i) != CAM_SUCCESS) {
+ if (xpt_bus_register(gdt->sims[i], gdt->sc_devnode, i) != CAM_SUCCESS) {
cam_sim_free(gdt->sims[i], /*free_devq*/i == 0);
break;
}
diff --git a/sys/dev/iir/iir.h b/sys/dev/iir/iir.h
index 62f429a..dca493d 100644
--- a/sys/dev/iir/iir.h
+++ b/sys/dev/iir/iir.h
@@ -590,6 +590,7 @@ struct gdt_intr_ctx {
/* softc structure */
struct gdt_softc {
+ device_t sc_devnode;
int sc_hanum;
int sc_class; /* Controller class */
#define GDT_MPR 0x05
diff --git a/sys/dev/iir/iir_pci.c b/sys/dev/iir/iir_pci.c
index dbeff0b..528b7d7 100644
--- a/sys/dev/iir/iir_pci.c
+++ b/sys/dev/iir/iir_pci.c
@@ -209,7 +209,7 @@ iir_pci_attach(device_t dev)
}
gdt = device_get_softc(dev);
- bzero(gdt, sizeof(struct gdt_softc));
+ gdt->sc_devnode = dev;
gdt->sc_init_level = 0;
gdt->sc_dpmemt = rman_get_bustag(io);
gdt->sc_dpmemh = rman_get_bushandle(io);
OpenPOWER on IntegriCloud