Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_enc_ses.c
Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | |||||
#define SES_FLAG_TIMEDCOMP 0x01 | #define SES_FLAG_TIMEDCOMP 0x01 | ||||
#define SES_FLAG_ADDLSTATUS 0x02 | #define SES_FLAG_ADDLSTATUS 0x02 | ||||
#define SES_FLAG_DESC 0x04 | #define SES_FLAG_DESC 0x04 | ||||
ses_control_reqlist_t ses_requests; | ses_control_reqlist_t ses_requests; | ||||
ses_control_reqlist_t ses_pending_requests; | ses_control_reqlist_t ses_pending_requests; | ||||
} ses_softc_t; | } ses_softc_t; | ||||
static int ses_search_globally = 0; | |||||
SYSCTL_INT(_kern_cam_enc, OID_AUTO, search_globally, CTLFLAG_RWTUN, | |||||
&ses_search_globally, 0, "Search for disks on other buses"); | |||||
/** | /** | ||||
* \brief Reset a SES iterator to just before the first element | * \brief Reset a SES iterator to just before the first element | ||||
* in the configuration. | * in the configuration. | ||||
* | * | ||||
* \param iter The iterator object to reset. | * \param iter The iterator object to reset. | ||||
* | * | ||||
* The indexes within a reset iterator are invalid and will only | * The indexes within a reset iterator are invalid and will only | ||||
* become valid upon completion of a ses_iter_seek_to() or a | * become valid upon completion of a ses_iter_seek_to() or a | ||||
▲ Show 20 Lines • Show All 500 Lines • ▼ Show 20 Lines | ses_path_iter_devid_callback(enc_softc_t *enc, enc_element_t *elem, | ||||
match_pattern.type = DEV_MATCH_DEVICE; | match_pattern.type = DEV_MATCH_DEVICE; | ||||
device_pattern = &match_pattern.pattern.device_pattern; | device_pattern = &match_pattern.pattern.device_pattern; | ||||
device_pattern->flags = DEV_MATCH_DEVID; | device_pattern->flags = DEV_MATCH_DEVID; | ||||
device_pattern->data.devid_pat.id_len = | device_pattern->data.devid_pat.id_len = | ||||
offsetof(struct scsi_vpd_id_descriptor, identifier) | offsetof(struct scsi_vpd_id_descriptor, identifier) | ||||
+ devid->length; | + devid->length; | ||||
memcpy(device_pattern->data.devid_pat.id, devid, | memcpy(device_pattern->data.devid_pat.id, devid, | ||||
device_pattern->data.devid_pat.id_len); | device_pattern->data.devid_pat.id_len); | ||||
if (!ses_search_globally) { | |||||
device_pattern->flags |= DEV_MATCH_PATH; | |||||
imp: This is going in after your change from MATCH_NONE == 0 to MATCH_ANY == 0?
If so, then it's… | |||||
Done Inline ActionsIt is. Though not sure why have you mentioned MATCH_ANY == 0 part, not the optimization in the same review. mav: It is. Though not sure why have you mentioned MATCH_ANY == 0 part, not the optimization in the… | |||||
device_pattern->path_id = xpt_path_path_id(enc->periph->path); | |||||
} | |||||
memset(&cdm, 0, sizeof(cdm)); | memset(&cdm, 0, sizeof(cdm)); | ||||
if (xpt_create_path(&cdm.ccb_h.path, /*periph*/NULL, | if (xpt_create_path(&cdm.ccb_h.path, /*periph*/NULL, | ||||
CAM_XPT_PATH_ID, | CAM_XPT_PATH_ID, | ||||
CAM_TARGET_WILDCARD, | CAM_TARGET_WILDCARD, | ||||
CAM_LUN_WILDCARD) != CAM_REQ_CMP) | CAM_LUN_WILDCARD) != CAM_REQ_CMP) | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 2,149 Lines • Show Last 20 Lines |
This is going in after your change from MATCH_NONE == 0 to MATCH_ANY == 0?
If so, then it's good.