diff options
author | Alexander Motin <mav@FreeBSD.org> | 2012-03-31 11:23:09 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2012-03-31 11:23:09 +0000 |
commit | 71c8e5f440afd42537ff9f85207854bb65eff3ec (patch) | |
tree | 32279f36434b36cccde1882c6273c91cd6275541 /sys/cam/scsi/scsi_da.c | |
parent | 2b9536028f0b9510fe3f037868995776b1796a0e (diff) | |
download | src-71c8e5f440afd42537ff9f85207854bb65eff3ec.tar.gz src-71c8e5f440afd42537ff9f85207854bb65eff3ec.zip |
Be more conservative in using READ CAPACITY(16) command. Previous code
checked PROTECT bit in INQUIRY data for all SPC devices, while it is defined
only since SPC-3. But there are some SPC-2 USB devices were reported, that
have PROTECT bit set, return no error for READ CAPACITY(16) command, but
return wrong sector count value in response.
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=233746
Diffstat (limited to 'sys/cam/scsi/scsi_da.c')
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index fe7a109e20bf..a437d3703057 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -1631,9 +1631,7 @@ daregister(struct cam_periph *periph, void *arg) softc->minimum_cmd_size = 16; /* Predict whether device may support READ CAPACITY(16). */ - if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 || - (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC && - (cgd->inq_data.spc3_flags & SPC3_SID_PROTECT))) { + if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3) { softc->flags |= DA_FLAG_CAN_RC16; softc->state = DA_STATE_PROBE2; } |