summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2017-01-05 11:47:26 +0000
committermav <mav@FreeBSD.org>2017-01-05 11:47:26 +0000
commita29eafed906a685d023603f052cdd6ea1682ebf7 (patch)
tree46da9e34c0dd4add6fc598f3ba5d849e01c14ee9 /sys/cam
parent72dae226f530f3e39c4646d39463f30a0abc0a46 (diff)
downloadFreeBSD-src-a29eafed906a685d023603f052cdd6ea1682ebf7.zip
FreeBSD-src-a29eafed906a685d023603f052cdd6ea1682ebf7.tar.gz
MFC r310373:
Add support for REPORTING OPTIONS == 3 in REPORT SUPPORTED OPERATION CODES.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ctl/ctl.c14
-rw-r--r--sys/cam/scsi/scsi_all.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 1335ca9..e8a8f85 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -7362,6 +7362,8 @@ ctl_report_supported_opcodes(struct ctl_scsiio *ctsio)
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:
@@ -7450,6 +7452,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);
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h
index af7b65b..b682624f 100644
--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -1453,6 +1453,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];
OpenPOWER on IntegriCloud