From owner-svn-src-stable@freebsd.org Thu Jan 5 11:46:47 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA87ACA0C97; Thu, 5 Jan 2017 11:46:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CD501D4D; Thu, 5 Jan 2017 11:46:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05BkkcA058819; Thu, 5 Jan 2017 11:46:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05BkkMl058817; Thu, 5 Jan 2017 11:46:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701051146.v05BkkMl058817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 5 Jan 2017 11:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r311429 - in stable/11/sys/cam: ctl scsi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 11:46:48 -0000 Author: mav Date: Thu Jan 5 11:46:46 2017 New Revision: 311429 URL: https://svnweb.freebsd.org/changeset/base/311429 Log: MFC r310373: Add support for REPORTING OPTIONS == 3 in REPORT SUPPORTED OPERATION CODES. Modified: stable/11/sys/cam/ctl/ctl.c stable/11/sys/cam/scsi/scsi_all.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ctl/ctl.c ============================================================================== --- stable/11/sys/cam/ctl/ctl.c Thu Jan 5 11:45:36 2017 (r311428) +++ stable/11/sys/cam/ctl/ctl.c Thu Jan 5 11:46:46 2017 (r311429) @@ -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: stable/11/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/11/sys/cam/scsi/scsi_all.h Thu Jan 5 11:45:36 2017 (r311428) +++ stable/11/sys/cam/scsi/scsi_all.h Thu Jan 5 11:46:46 2017 (r311429) @@ -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];