svn commit: r349246 - head/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Thu Jun 20 22:20:31 UTC 2019


Author: mav
Date: Thu Jun 20 22:20:30 2019
New Revision: 349246
URL: https://svnweb.freebsd.org/changeset/base/349246

Log:
  SPC-3 and up require some UAs to be returned as fixed.
  
  MFC after:	2 weeks

Modified:
  head/sys/cam/ctl/ctl_error.c

Modified: head/sys/cam/ctl/ctl_error.c
==============================================================================
--- head/sys/cam/ctl/ctl_error.c	Thu Jun 20 21:52:30 2019	(r349245)
+++ head/sys/cam/ctl/ctl_error.c	Thu Jun 20 22:20:30 2019	(r349246)
@@ -81,6 +81,12 @@ ctl_set_sense_data_va(struct scsi_sense_data *sense_da
 	 */
 	if (sense_format == SSD_TYPE_NONE) {
 		/*
+		 * SPC-3 and up require some UAs to be returned as fixed.
+		 */
+		if (asc == 0x29 || (asc == 0x2A && ascq == 0x01))
+			sense_format = SSD_TYPE_FIXED;
+		else
+		/*
 		 * If the format isn't specified, we only return descriptor
 		 * sense if the LUN exists and descriptor sense is turned
 		 * on for that LUN.


More information about the svn-src-head mailing list