Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_xpt.c
Show First 20 Lines • Show All 2,014 Lines • ▼ Show 20 Lines | case XPT_SCAN_TGT: | ||||
CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE, | CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE, | ||||
("SCAN start for %p\n", scan_info)); | ("SCAN start for %p\n", scan_info)); | ||||
scan_info->request_ccb = request_ccb; | scan_info->request_ccb = request_ccb; | ||||
scan_info->cpi = &work_ccb->cpi; | scan_info->cpi = &work_ccb->cpi; | ||||
/* Cache on our stack so we can work asynchronously */ | /* Cache on our stack so we can work asynchronously */ | ||||
max_target = scan_info->cpi->max_target; | max_target = scan_info->cpi->max_target; | ||||
low_target = 0; | low_target = 0; | ||||
/* | |||||
* SAS does not have a concept of initiator ID, so ignore | |||||
* the SIM provided value which is traditionally faked for | |||||
* legacy reasons and use an impossible one that's guaranteed | |||||
* to be greater than max_target. | |||||
*/ | |||||
switch(scan_info->cpi->transport) { | |||||
case XPORT_SAS: | |||||
initiator_id = UINT_MAX; | |||||
break; | |||||
default: | |||||
initiator_id = scan_info->cpi->initiator_id; | initiator_id = scan_info->cpi->initiator_id; | ||||
break; | |||||
} | |||||
/* | /* | ||||
* We can scan all targets in parallel, or do it sequentially. | * We can scan all targets in parallel, or do it sequentially. | ||||
*/ | */ | ||||
if (request_ccb->ccb_h.func_code == XPT_SCAN_TGT) { | if (request_ccb->ccb_h.func_code == XPT_SCAN_TGT) { | ||||
max_target = low_target = request_ccb->ccb_h.target_id; | max_target = low_target = request_ccb->ccb_h.target_id; | ||||
▲ Show 20 Lines • Show All 1,209 Lines • Show Last 20 Lines |