svn commit: r233828 - stable/9/sys/cam/scsi

Alexander Motin mav at FreeBSD.org
Tue Apr 3 08:29:40 UTC 2012


Author: mav
Date: Tue Apr  3 08:29:39 2012
New Revision: 233828
URL: http://svn.freebsd.org/changeset/base/233828

Log:
  MFC r233746:
  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.

Modified:
  stable/9/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/9/sys/cam/scsi/scsi_da.c	Tue Apr  3 08:28:43 2012	(r233827)
+++ stable/9/sys/cam/scsi/scsi_da.c	Tue Apr  3 08:29:39 2012	(r233828)
@@ -1540,9 +1540,7 @@ daregister(struct cam_periph *periph, vo
 		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;
 	}


More information about the svn-src-stable-9 mailing list