Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_da.c
Show First 20 Lines • Show All 2,456 Lines • ▼ Show 20 Lines | match = cam_quirkmatch((caddr_t)&cgd->inq_data, | ||||
sizeof(*da_quirk_table), scsi_inquiry_match); | sizeof(*da_quirk_table), scsi_inquiry_match); | ||||
if (match != NULL) | if (match != NULL) | ||||
softc->quirks = ((struct da_quirk_entry *)match)->quirks; | softc->quirks = ((struct da_quirk_entry *)match)->quirks; | ||||
else | else | ||||
softc->quirks = DA_Q_NONE; | softc->quirks = DA_Q_NONE; | ||||
/* Check if the SIM does not want 6 byte commands */ | /* Check if the SIM does not want 6 byte commands */ | ||||
bzero(&cpi, sizeof(cpi)); | xpt_path_inq(&cpi, periph->path, CAM_PRIORITY_NORMAL); | ||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | |||||
cpi.ccb_h.func_code = XPT_PATH_INQ; | |||||
xpt_action((union ccb *)&cpi); | |||||
if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE)) | if (cpi.ccb_h.status == CAM_REQ_CMP && (cpi.hba_misc & PIM_NO_6_BYTE)) | ||||
softc->quirks |= DA_Q_NO_6_BYTE; | softc->quirks |= DA_Q_NO_6_BYTE; | ||||
if (SID_TYPE(&cgd->inq_data) == T_ZBC_HM) | if (SID_TYPE(&cgd->inq_data) == T_ZBC_HM) | ||||
softc->zone_mode = DA_ZONE_HOST_MANAGED; | softc->zone_mode = DA_ZONE_HOST_MANAGED; | ||||
else if (softc->quirks & DA_Q_SMR_DM) | else if (softc->quirks & DA_Q_SMR_DM) | ||||
softc->zone_mode = DA_ZONE_DRIVE_MANAGED; | softc->zone_mode = DA_ZONE_DRIVE_MANAGED; | ||||
else | else | ||||
▲ Show 20 Lines • Show All 3,583 Lines • Show Last 20 Lines |