summaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2003-07-29 04:00:35 +0000
committerNate Lawson <njl@FreeBSD.org>2003-07-29 04:00:35 +0000
commit065ab42faa7f9ac44db55c067533faf8da33a3f4 (patch)
tree814e224ab6dd3ec41a75a96bc2fc088b3d774607 /sys/cam
parent22774c8621cfc7be29b99e38b2e4e833ad11a743 (diff)
Notes
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/cam_ccb.h3
-rw-r--r--sys/cam/scsi/scsi_da.c11
2 files changed, 13 insertions, 1 deletions
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h
index 2184465bda95..6b4c7d9a14c2 100644
--- a/sys/cam/cam_ccb.h
+++ b/sys/cam/cam_ccb.h
@@ -483,7 +483,8 @@ typedef enum {
PIM_SCANHILO = 0x80, /* Bus scans from high ID to low ID */
PIM_NOREMOVE = 0x40, /* Removeable devices not included in scan */
PIM_NOINITIATOR = 0x20, /* Initiator role not supported. */
- PIM_NOBUSRESET = 0x10 /* User has disabled initial BUS RESET */
+ PIM_NOBUSRESET = 0x10, /* User has disabled initial BUS RESET */
+ PIM_NO_6_BYTE = 0x08 /* Do not send 6-byte commands */
} pi_miscflag;
/* Path Inquiry CCB */
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 34e963e556bf..68b423e08294 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1226,6 +1226,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;
caddr_t match;
@@ -1274,6 +1275,16 @@ 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;
+
+ /*
+ * RBC devices don't have to support READ(6), only READ(10).
+ */
if (softc->quirks & DA_Q_NO_6_BYTE || SID_TYPE(&cgd->inq_data) == T_RBC)
softc->minimum_cmd_size = 10;
else