diff options
author | mav <mav@FreeBSD.org> | 2010-04-30 08:57:03 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2010-04-30 08:57:03 +0000 |
commit | 99446b1a227e6c51f9fb58242a3265e9d32464fc (patch) | |
tree | fed987c00143ddec40d7e8018077c2cfd2958870 /sys/cam | |
parent | 1c92d062edb474dafbad2b4ddc7290843cbfe8f9 (diff) | |
download | FreeBSD-src-99446b1a227e6c51f9fb58242a3265e9d32464fc.zip FreeBSD-src-99446b1a227e6c51f9fb58242a3265e9d32464fc.tar.gz |
Revert r198705.
As scottl@ noticed, max_target/max_lun was intended to be only a hint for
existing bus scanner. Some FC/SAS SIMs report fake values there, that are
smaller then maximum supported IDs. In that case this check makes impossible
manual scan outside hinted range.
For ATA/SATA SIMs respective check was instead implemented at SIM level.
Newer SCSI SIMs expected to have these checks at driver or firmware level.
Some older SCSI SIMs have no this check and the issues will get back there.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_xpt.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 1812edb..ed05c40 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -467,34 +467,7 @@ xptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td ccb = xpt_alloc_ccb(); CAM_SIM_LOCK(bus->sim); - /* Ensure passed in target/lun supported on this bus. */ - if ((inccb->ccb_h.target_id != CAM_TARGET_WILDCARD) || - (inccb->ccb_h.target_lun != CAM_LUN_WILDCARD)) { - if (xpt_create_path(&ccb->ccb_h.path, - xpt_periph, - inccb->ccb_h.path_id, - CAM_TARGET_WILDCARD, - CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - error = EINVAL; - CAM_SIM_UNLOCK(bus->sim); - xpt_free_ccb(ccb); - break; - } - xpt_setup_ccb(&ccb->ccb_h, ccb->ccb_h.path, - inccb->ccb_h.pinfo.priority); - ccb->ccb_h.func_code = XPT_PATH_INQ; - xpt_action(ccb); - xpt_free_path(ccb->ccb_h.path); - if ((inccb->ccb_h.target_id != CAM_TARGET_WILDCARD && - inccb->ccb_h.target_id > ccb->cpi.max_target) || - (inccb->ccb_h.target_lun != CAM_LUN_WILDCARD && - inccb->ccb_h.target_lun > ccb->cpi.max_lun)) { - error = EINVAL; - CAM_SIM_UNLOCK(bus->sim); - xpt_free_ccb(ccb); - break; - } - } + /* * Create a path using the bus, target, and lun the * user passed in. |