Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2019 22:20:30 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r349246 - head/sys/cam/ctl
Message-ID:  <201906202220.x5KMKUFB075849@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906202220.x5KMKUFB075849>