Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_sa.c
Show First 20 Lines • Show All 2,397 Lines • ▼ Show 20 Lines | if (cgd->inq_data.version <= SCSI_REV_CCS) | ||||
softc->quirks |= SA_QUIRK_NO_LONG_POS; | softc->quirks |= SA_QUIRK_NO_LONG_POS; | ||||
if (cgd->inq_data.spc3_flags & SPC3_SID_PROTECT) { | if (cgd->inq_data.spc3_flags & SPC3_SID_PROTECT) { | ||||
struct ccb_dev_advinfo cdai; | struct ccb_dev_advinfo cdai; | ||||
struct scsi_vpd_extended_inquiry_data ext_inq; | struct scsi_vpd_extended_inquiry_data ext_inq; | ||||
bzero(&ext_inq, sizeof(ext_inq)); | bzero(&ext_inq, sizeof(ext_inq)); | ||||
memset(&cdai, 0, sizeof(cdai)); | |||||
xpt_setup_ccb(&cdai.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | xpt_setup_ccb(&cdai.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | ||||
cdai.ccb_h.func_code = XPT_DEV_ADVINFO; | cdai.ccb_h.func_code = XPT_DEV_ADVINFO; | ||||
cdai.flags = CDAI_FLAG_NONE; | cdai.flags = CDAI_FLAG_NONE; | ||||
cdai.buftype = CDAI_TYPE_EXT_INQ; | cdai.buftype = CDAI_TYPE_EXT_INQ; | ||||
cdai.bufsiz = sizeof(ext_inq); | cdai.bufsiz = sizeof(ext_inq); | ||||
cdai.buf = (uint8_t *)&ext_inq; | cdai.buf = (uint8_t *)&ext_inq; | ||||
xpt_action((union ccb *)&cdai); | xpt_action((union ccb *)&cdai); | ||||
▲ Show 20 Lines • Show All 1,997 Lines • ▼ Show 20 Lines | saextget(struct cdev *dev, struct cam_periph *periph, struct sbuf *sb, | ||||
indent = 0; | indent = 0; | ||||
SASBADDNODE(sb, indent, mtextget); | SASBADDNODE(sb, indent, mtextget); | ||||
/* | /* | ||||
* Basic CAM peripheral information. | * Basic CAM peripheral information. | ||||
*/ | */ | ||||
SASBADDVARSTR(sb, indent, periph->periph_name, %s, periph_name, | SASBADDVARSTR(sb, indent, periph->periph_name, %s, periph_name, | ||||
strlen(periph->periph_name) + 1); | strlen(periph->periph_name) + 1); | ||||
SASBADDUINT(sb, indent, periph->unit_number, %u, unit_number); | SASBADDUINT(sb, indent, periph->unit_number, %u, unit_number); | ||||
memset(&cgd, 0, sizeof(cgd)); | |||||
xpt_setup_ccb(&cgd.ccb_h, | xpt_setup_ccb(&cgd.ccb_h, | ||||
periph->path, | periph->path, | ||||
CAM_PRIORITY_NORMAL); | CAM_PRIORITY_NORMAL); | ||||
cgd.ccb_h.func_code = XPT_GDEV_TYPE; | cgd.ccb_h.func_code = XPT_GDEV_TYPE; | ||||
xpt_action((union ccb *)&cgd); | xpt_action((union ccb *)&cgd); | ||||
if ((cgd.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { | if ((cgd.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { | ||||
g->status = MT_EXT_GET_ERROR; | g->status = MT_EXT_GET_ERROR; | ||||
snprintf(g->error_str, sizeof(g->error_str), | snprintf(g->error_str, sizeof(g->error_str), | ||||
▲ Show 20 Lines • Show All 1,478 Lines • Show Last 20 Lines |