svn commit: r310373 - in head/sys/cam: ctl scsi
Alexander Motin
mav at FreeBSD.org
Wed Dec 21 20:19:13 UTC 2016
Author: mav
Date: Wed Dec 21 20:19:12 2016
New Revision: 310373
URL: https://svnweb.freebsd.org/changeset/base/310373
Log:
Add support for REPORTING OPTIONS == 3 in REPORT SUPPORTED OPERATION CODES.
MFC after: 2 weeks
Modified:
head/sys/cam/ctl/ctl.c
head/sys/cam/scsi/scsi_all.h
Modified: head/sys/cam/ctl/ctl.c
==============================================================================
--- head/sys/cam/ctl/ctl.c Wed Dec 21 18:42:04 2016 (r310372)
+++ head/sys/cam/ctl/ctl.c Wed Dec 21 20:19:12 2016 (r310373)
@@ -7371,6 +7371,8 @@ ctl_report_supported_opcodes(struct ctl_
ctl_done((union ctl_io *)ctsio);
return (CTL_RETVAL_COMPLETE);
}
+ /* FALLTHROUGH */
+ case RSO_OPTIONS_OC_ASA:
total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32;
break;
default:
@@ -7459,6 +7461,18 @@ fill_one:
} else
one->support = 1;
break;
+ case RSO_OPTIONS_OC_ASA:
+ one = (struct scsi_report_supported_opcodes_one *)
+ ctsio->kern_data_ptr;
+ entry = &ctl_cmd_table[opcode];
+ if (entry->flags & CTL_CMD_FLAG_SA5) {
+ entry = &((const struct ctl_cmd_entry *)
+ entry->execute)[service_action];
+ } else if (service_action != 0) {
+ one->support = 1;
+ break;
+ }
+ goto fill_one;
}
ctl_set_success(ctsio);
Modified: head/sys/cam/scsi/scsi_all.h
==============================================================================
--- head/sys/cam/scsi/scsi_all.h Wed Dec 21 18:42:04 2016 (r310372)
+++ head/sys/cam/scsi/scsi_all.h Wed Dec 21 20:19:12 2016 (r310373)
@@ -1456,6 +1456,7 @@ struct scsi_report_supported_opcodes
#define RSO_OPTIONS_ALL 0x00
#define RSO_OPTIONS_OC 0x01
#define RSO_OPTIONS_OC_SA 0x02
+#define RSO_OPTIONS_OC_ASA 0x03
uint8_t requested_opcode;
uint8_t requested_service_action[2];
uint8_t length[4];
More information about the svn-src-all
mailing list