From owner-svn-src-stable-12@freebsd.org Tue Aug 27 03:53:22 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE3C6C80C9; Tue, 27 Aug 2019 03:53:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46HZjG4CXvz4JQd; Tue, 27 Aug 2019 03:53:22 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 727DD18E3D; Tue, 27 Aug 2019 03:53:22 +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 x7R3rM38094474; Tue, 27 Aug 2019 03:53:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7R3rMwO094473; Tue, 27 Aug 2019 03:53:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908270353.x7R3rMwO094473@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 27 Aug 2019 03:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r351528 - stable/12/sbin/camcontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sbin/camcontrol X-SVN-Commit-Revision: 351528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2019 03:53:22 -0000 Author: mav Date: Tue Aug 27 03:53:22 2019 New Revision: 351528 URL: https://svnweb.freebsd.org/changeset/base/351528 Log: MFC r350424: Use present now scsi_mode_sense_subpage(). Modified: stable/12/sbin/camcontrol/timestamp.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/camcontrol/timestamp.c ============================================================================== --- stable/12/sbin/camcontrol/timestamp.c Tue Aug 27 03:52:22 2019 (r351527) +++ stable/12/sbin/camcontrol/timestamp.c Tue Aug 27 03:53:22 2019 (r351528) @@ -79,7 +79,6 @@ set_restore_flags(struct cam_device *device, uint8_t * int error = 0; struct scsi_control_ext_page *control_page = NULL; struct scsi_mode_header_10 *mode_hdr = NULL; - struct scsi_mode_sense_10 *cdb = NULL; union ccb *ccb = NULL; unsigned long mode_buf_size = sizeof(struct scsi_mode_header_10) + sizeof(struct scsi_mode_blk_desc) + @@ -96,25 +95,19 @@ set_restore_flags(struct cam_device *device, uint8_t * * Get the control extension subpage, we'll send it back modified to * enable SCSI control over the tape drive's timestamp */ - scsi_mode_sense_len(&ccb->csio, + scsi_mode_sense_subpage(&ccb->csio, /*retries*/ retry_count, /*cbfcnp*/ NULL, /*tag_action*/ task_attr, /*dbd*/ 0, /*page_control*/ SMS_PAGE_CTRL_CURRENT, /*page*/ SCEP_PAGE_CODE, + /*subpage*/ SCEP_SUBPAGE_CODE, /*param_buf*/ &mode_buf[0], /*param_len*/ mode_buf_size, /*minimum_cmd_size*/ 10, /*sense_len*/ SSD_FULL_SIZE, /*timeout*/ timeout ? timeout : 5000); - /* - * scsi_mode_sense_len does not have a subpage argument at the moment, - * so we have to manually set the subpage code before calling - * cam_send_ccb(). - */ - cdb = (struct scsi_mode_sense_10 *)ccb->csio.cdb_io.cdb_bytes; - cdb->subpage = SCEP_SUBPAGE_CODE; ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; if (retry_count > 0)