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/cam | |
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/cam')
-rw-r--r-- | sys/cam/cam_xpt.c | 5 | ||||
-rw-r--r-- | sys/cam/cam_xpt_sim.h | 3 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_low.c | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 51a8a38..56a16a3 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -197,6 +197,7 @@ struct cam_eb { #define CAM_EB_RUNQ_SCHEDULED 0x01 u_int32_t refcount; u_int generation; + device_t parent_dev; }; struct cam_path { @@ -1505,7 +1506,7 @@ xpt_init(void *dummy) xpt_sim->max_ccbs = 16; mtx_lock(&xsoftc.xpt_lock); - if ((status = xpt_bus_register(xpt_sim, /*bus #*/0)) != CAM_SUCCESS) { + if ((status = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_SUCCESS) { printf("xpt_init: xpt_bus_register failed with status %#x," " failing attach\n", status); return (EINVAL); @@ -4320,7 +4321,7 @@ xpt_release_ccb(union ccb *free_ccb) * availible, the bus will be probed. */ int32_t -xpt_bus_register(struct cam_sim *sim, u_int32_t bus) +xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) { struct cam_eb *new_bus; struct cam_eb *old_bus; diff --git a/sys/cam/cam_xpt_sim.h b/sys/cam/cam_xpt_sim.h index 603c9ef..d824093 100644 --- a/sys/cam/cam_xpt_sim.h +++ b/sys/cam/cam_xpt_sim.h @@ -37,7 +37,8 @@ /* Functions accessed by SIM drivers */ #ifdef _KERNEL -int32_t xpt_bus_register(struct cam_sim *sim, u_int32_t bus); +int32_t xpt_bus_register(struct cam_sim *sim, device_t parent, + u_int32_t bus); int32_t xpt_bus_deregister(path_id_t path_id); u_int32_t xpt_freeze_simq(struct cam_sim *sim, u_int count); void xpt_release_simq(struct cam_sim *sim, int run_queue); diff --git a/sys/cam/scsi/scsi_low.c b/sys/cam/scsi/scsi_low.c index 695815c..0f4fe27 100644 --- a/sys/cam/scsi/scsi_low.c +++ b/sys/cam/scsi/scsi_low.c @@ -1351,7 +1351,7 @@ scsi_low_attach_cam(slp) return ENODEV; } - if (xpt_bus_register(slp->sl_si.sim, 0) != CAM_SUCCESS) { + if (xpt_bus_register(slp->sl_si.sim, NULL, 0) != CAM_SUCCESS) { free(slp->sl_si.sim, M_SCSILOW); return ENODEV; } |