diff options
Diffstat (limited to 'sys/cam/scsi/scsi_da.c')
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 2d7fb83..07651ea 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -1087,6 +1087,7 @@ daregister(struct cam_periph *periph, void *arg) int s; struct da_softc *softc; struct ccb_setasync csa; + struct ccb_pathinq cpi; struct ccb_getdev *cgd; char tmpstr[80], tmpstr2[80]; caddr_t match; @@ -1134,6 +1135,13 @@ daregister(struct cam_periph *periph, void *arg) else softc->quirks = DA_Q_NONE; + /* Check if the SIM does not want 6 byte commands */ + xpt_setup_ccb(&cpi.ccb_h, periph->path, /*priority*/1); + 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)) + softc->quirks |= DA_Q_NO_6_BYTE; + snprintf(tmpstr, sizeof(tmpstr), "CAM DA unit %d", periph->unit_number); snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number); sysctl_ctx_init(&softc->sysctl_ctx); |