diff options
author | mav <mav@FreeBSD.org> | 2013-04-14 09:55:48 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2013-04-14 09:55:48 +0000 |
commit | 3d32e6b10c85bbbaea953937412778787bba3629 (patch) | |
tree | df9949ed179b54ed307f0058d4d461e9e3179b33 /sys/cam | |
parent | f73c311ca37f75cf30157cd16614f936361e956b (diff) | |
download | FreeBSD-src-3d32e6b10c85bbbaea953937412778787bba3629.zip FreeBSD-src-3d32e6b10c85bbbaea953937412778787bba3629.tar.gz |
MFprojects/camlock r248982:
Stop abusing xpt_periph in random plases that really have no periph related
to CCB, for example, bus scanning. NULL value is fine in such cases and it
is correctly logged in debug messages as "noperiph". If at some point we
need some real XPT periphs (alike to pmpX now), quite likely they will be
per-bus, and not a single global instance as xpt_periph now.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/ata/ata_xpt.c | 4 | ||||
-rw-r--r-- | sys/cam/cam_xpt.c | 8 | ||||
-rw-r--r-- | sys/cam/ctl/ctl_frontend_cam_sim.c | 2 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_xpt.c | 8 |
4 files changed, 11 insertions, 11 deletions
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c index 2a3b0f4..f9c47ba 100644 --- a/sys/cam/ata/ata_xpt.c +++ b/sys/cam/ata/ata_xpt.c @@ -1439,7 +1439,7 @@ done: scan_info->counter = (scan_info->counter + 1 ) % (scan_info->cpi->max_target + 1); scan_next: - status = xpt_create_path(&path, xpt_periph, + status = xpt_create_path(&path, NULL, scan_info->request_ccb->ccb_h.path_id, scan_info->counter, 0); if (status != CAM_REQ_CMP) { @@ -1497,7 +1497,7 @@ ata_scan_lun(struct cam_periph *periph, struct cam_path *path, "can't continue\n"); return; } - status = xpt_create_path(&new_path, xpt_periph, + status = xpt_create_path(&new_path, NULL, path->bus->path_id, path->target->target_id, path->device->lun_id); diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index ce246c0..245a565 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -451,7 +451,7 @@ xptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td * Create a path using the bus, target, and lun the * user passed in. */ - if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, + if (xpt_create_path(&ccb->ccb_h.path, NULL, inccb->ccb_h.path_id, inccb->ccb_h.target_id, inccb->ccb_h.target_lun) != @@ -487,7 +487,7 @@ xptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td * Create a path using the bus, target, and lun the * user passed in. */ - if (xpt_create_path(&ccb.ccb_h.path, xpt_periph, + if (xpt_create_path(&ccb.ccb_h.path, NULL, inccb->ccb_h.path_id, inccb->ccb_h.target_id, inccb->ccb_h.target_lun) != @@ -2918,7 +2918,7 @@ xpt_action_default(union ccb *start_ccb) CAM_SIM_LOCK(xpt_path_sim(start_ccb->ccb_h.path)); } if (start_ccb->cdbg.flags != CAM_DEBUG_NONE) { - if (xpt_create_path(&cam_dpath, xpt_periph, + if (xpt_create_path(&cam_dpath, NULL, start_ccb->ccb_h.path_id, start_ccb->ccb_h.target_id, start_ccb->ccb_h.target_lun) != @@ -4640,7 +4640,7 @@ xpt_config(void *arg) /* Setup debugging path */ if (cam_dflags != CAM_DEBUG_NONE) { - if (xpt_create_path_unlocked(&cam_dpath, xpt_periph, + if (xpt_create_path_unlocked(&cam_dpath, NULL, CAM_DEBUG_BUS, CAM_DEBUG_TARGET, CAM_DEBUG_LUN) != CAM_REQ_CMP) { printf("xpt_config: xpt_create_path() failed for debug" diff --git a/sys/cam/ctl/ctl_frontend_cam_sim.c b/sys/cam/ctl/ctl_frontend_cam_sim.c index 6a6a487..2e60b64 100644 --- a/sys/cam/ctl/ctl_frontend_cam_sim.c +++ b/sys/cam/ctl/ctl_frontend_cam_sim.c @@ -311,7 +311,7 @@ cfcs_onoffline(void *arg, int online) goto bailout; } - if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, + if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(softc->sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { printf("%s: can't allocate path for rescan\n", __func__); diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 5d0512e..fb2f584 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -1953,7 +1953,7 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb) if (i == initiator_id) continue; - status = xpt_create_path(&path, xpt_periph, + status = xpt_create_path(&path, NULL, request_ccb->ccb_h.path_id, i, 0); if (status != CAM_REQ_CMP) { @@ -2154,7 +2154,7 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb) xpt_free_ccb(request_ccb); break; } - status = xpt_create_path(&path, xpt_periph, + status = xpt_create_path(&path, NULL, scan_info->request_ccb->ccb_h.path_id, scan_info->counter, 0); if (status != CAM_REQ_CMP) { @@ -2177,7 +2177,7 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb) request_ccb->crcn.flags = scan_info->request_ccb->crcn.flags; } else { - status = xpt_create_path(&path, xpt_periph, + status = xpt_create_path(&path, NULL, path_id, target_id, lun_id); /* * Free the old request path- we're done with it. We @@ -2250,7 +2250,7 @@ scsi_scan_lun(struct cam_periph *periph, struct cam_path *path, "can't continue\n"); return; } - status = xpt_create_path(&new_path, xpt_periph, + status = xpt_create_path(&new_path, NULL, path->bus->path_id, path->target->target_id, path->device->lun_id); |