Author: mav
Date: Thu Jan  5 11:47:26 2017
New Revision: 311430
URL: https://svnweb.freebsd.org/changeset/base/311430

Log:
  MFC r310373:
  Add support for REPORTING OPTIONS == 3 in REPORT SUPPORTED OPERATION CODES.

Modified:
  stable/10/sys/cam/ctl/ctl.c
  stable/10/sys/cam/scsi/scsi_all.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl.c Thu Jan  5 11:46:46 2017        (r311429)
+++ stable/10/sys/cam/ctl/ctl.c Thu Jan  5 11:47:26 2017        (r311430)
@@ -7362,6 +7362,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:
@@ -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);

Modified: stable/10/sys/cam/scsi/scsi_all.h
==============================================================================
--- stable/10/sys/cam/scsi/scsi_all.h   Thu Jan  5 11:46:46 2017        
(r311429)
+++ stable/10/sys/cam/scsi/scsi_all.h   Thu Jan  5 11:47:26 2017        
(r311430)
@@ -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];
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to