diff options
author | scottl <scottl@FreeBSD.org> | 2007-06-17 05:55:54 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2007-06-17 05:55:54 +0000 |
commit | ff584e70faf04177b3d2b50035e4e0031ad7e655 (patch) | |
tree | 1f069a0af9a8c28e09089c8dc789bcd435a94cce /sys/dev/dpt | |
parent | 001175ac64443d5853311173ea76dffb961d6c9f (diff) | |
download | FreeBSD-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/dpt')
-rw-r--r-- | sys/dev/dpt/dpt.h | 1 | ||||
-rw-r--r-- | sys/dev/dpt/dpt_eisa.c | 1 | ||||
-rw-r--r-- | sys/dev/dpt/dpt_isa.c | 2 | ||||
-rw-r--r-- | sys/dev/dpt/dpt_pci.c | 1 | ||||
-rw-r--r-- | sys/dev/dpt/dpt_scsi.c | 2 |
5 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/dpt/dpt.h b/sys/dev/dpt/dpt.h index bf87be1..b1562d3 100644 --- a/sys/dev/dpt/dpt.h +++ b/sys/dev/dpt/dpt.h @@ -1018,6 +1018,7 @@ struct sg_map_node { /* Main state machine and interface structure */ typedef struct dpt_softc { + device_t dev; struct resource * io_res; int io_rid; diff --git a/sys/dev/dpt/dpt_eisa.c b/sys/dev/dpt/dpt_eisa.c index 431cf1e..9c367c4 100644 --- a/sys/dev/dpt/dpt_eisa.c +++ b/sys/dev/dpt/dpt_eisa.c @@ -109,6 +109,7 @@ dpt_eisa_attach (device_t dev) int error = 0; dpt = device_get_softc(dev); + dpt->dev = dev; dpt->io_rid = 0; dpt->io_type = SYS_RES_IOPORT; diff --git a/sys/dev/dpt/dpt_isa.c b/sys/dev/dpt/dpt_isa.c index 96b67f2..62cf077 100644 --- a/sys/dev/dpt/dpt_isa.c +++ b/sys/dev/dpt/dpt_isa.c @@ -154,7 +154,7 @@ dpt_isa_attach (device_t dev) int error = 0; dpt = device_get_softc(dev); - + dpt->dev = dev; dpt->io_rid = 0; dpt->io_type = SYS_RES_IOPORT; diff --git a/sys/dev/dpt/dpt_pci.c b/sys/dev/dpt/dpt_pci.c index 9ca718c7b..df92565 100644 --- a/sys/dev/dpt/dpt_pci.c +++ b/sys/dev/dpt/dpt_pci.c @@ -81,6 +81,7 @@ dpt_pci_attach (device_t dev) u_int32_t command; dpt = device_get_softc(dev); + dpt->dev = dev; command = pci_read_config(dev, PCIR_COMMAND, /*bytes*/1); diff --git a/sys/dev/dpt/dpt_scsi.c b/sys/dev/dpt/dpt_scsi.c index 276f0c9..eb1f3f4 100644 --- a/sys/dev/dpt/dpt_scsi.c +++ b/sys/dev/dpt/dpt_scsi.c @@ -1579,7 +1579,7 @@ dpt_attach(dpt_softc_t *dpt) break; } - if (xpt_bus_register(dpt->sims[i], i) != CAM_SUCCESS) { + if (xpt_bus_register(dpt->sims[i], dpt->dev, i) != CAM_SUCCESS){ cam_sim_free(dpt->sims[i], /*free_devq*/i == 0); dpt->sims[i] = NULL; break; |