Date: Sun, 7 Jul 2019 18:51:01 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r349828 - stable/12/sys/cam/ctl Message-ID: <201907071851.x67Ip1fN076640@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sun Jul 7 18:51:01 2019 New Revision: 349828 URL: https://svnweb.freebsd.org/changeset/base/349828 Log: MFC r349246: SPC-3 and up require some UAs to be returned as fixed. Modified: stable/12/sys/cam/ctl/ctl_error.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/12/sys/cam/ctl/ctl_error.c Sun Jul 7 18:50:23 2019 (r349827) +++ stable/12/sys/cam/ctl/ctl_error.c Sun Jul 7 18:51:01 2019 (r349828) @@ -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?201907071851.x67Ip1fN076640>