SPC-3 and up require some UAs to be returned as fixed.

MFC after:	2 weeks
This commit is contained in:
Alexander Motin 2019-06-20 22:20:30 +00:00
parent ee37749af6
commit 68035f6381
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349246

View File

@ -80,6 +80,12 @@ ctl_set_sense_data_va(struct scsi_sense_data *sense_data, u_int *sense_len,
* data.
*/
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