aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2019-06-20 22:20:30 +0000
committerAlexander Motin <mav@FreeBSD.org>2019-06-20 22:20:30 +0000
commit68035f638124f85d3423e99e6e2d559d3ebd38c5 (patch)
tree0dc2d82327e9860c7c9fa67bb9550dfd5cc07a04 /sys/cam/ctl
parentee37749af6f8738f4c7edf54f80fe61dc71bf130 (diff)
downloadsrc-68035f638124f85d3423e99e6e2d559d3ebd38c5.tar.gz
src-68035f638124f85d3423e99e6e2d559d3ebd38c5.zip
SPC-3 and up require some UAs to be returned as fixed.
MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=349246
Diffstat (limited to 'sys/cam/ctl')
-rw-r--r--sys/cam/ctl/ctl_error.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_error.c b/sys/cam/ctl/ctl_error.c
index 17e9e3a51d80..dae4deb9e5e7 100644
--- a/sys/cam/ctl/ctl_error.c
+++ b/sys/cam/ctl/ctl_error.c
@@ -81,6 +81,12 @@ ctl_set_sense_data_va(struct scsi_sense_data *sense_data, u_int *sense_len,
*/
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.