From owner-svn-src-head@freebsd.org Tue Aug 29 15:46:36 2017 Return-Path: Delivered-To: svn-src-head@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 1D4B1DDEDB5; Tue, 29 Aug 2017 15:46:36 +0000 (UTC) (envelope-from imp@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 E08DA673E4; Tue, 29 Aug 2017 15:46:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7TFkYZf002166; Tue, 29 Aug 2017 15:46:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7TFkYBp002164; Tue, 29 Aug 2017 15:46:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708291546.v7TFkYBp002164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 29 Aug 2017 15:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322998 - in head/sys: cam dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: cam dev/nvme X-SVN-Commit-Revision: 322998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Aug 2017 15:46:36 -0000 Author: imp Date: Tue Aug 29 15:46:34 2017 New Revision: 322998 URL: https://svnweb.freebsd.org/changeset/base/322998 Log: Fix a few overlooked spots where the coded uses 16-bit NSIDs. Chuck Tuffli had submitted a more thorough patch that I was unaware of when I did my work and this brings in the bits I missed from that patch. PR: 220267 Submitted by: Chuck Tuffli Modified: head/sys/cam/cam_ccb.h head/sys/dev/nvme/nvme.h Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Tue Aug 29 15:29:57 2017 (r322997) +++ head/sys/cam/cam_ccb.h Tue Aug 29 15:46:34 2017 (r322998) @@ -631,7 +631,7 @@ struct ccb_pathinq_settings_sas { }; struct ccb_pathinq_settings_nvme { - uint16_t nsid; /* Namespace ID for this path */ + uint32_t nsid; /* Namespace ID for this path */ }; #define PATHINQ_SETTINGS_SIZE 128 Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Tue Aug 29 15:29:57 2017 (r322997) +++ head/sys/dev/nvme/nvme.h Tue Aug 29 15:46:34 2017 (r322998) @@ -1070,7 +1070,7 @@ int nvme_ns_bio_process(struct nvme_namespace *ns, str /* Command building helper functions -- shared with CAM */ static inline -void nvme_ns_flush_cmd(struct nvme_command *cmd, uint16_t nsid) +void nvme_ns_flush_cmd(struct nvme_command *cmd, uint32_t nsid) { cmd->opc = NVME_OPC_FLUSH; @@ -1078,7 +1078,7 @@ void nvme_ns_flush_cmd(struct nvme_command *cmd, uint1 } static inline -void nvme_ns_rw_cmd(struct nvme_command *cmd, uint32_t rwcmd, uint16_t nsid, +void nvme_ns_rw_cmd(struct nvme_command *cmd, uint32_t rwcmd, uint32_t nsid, uint64_t lba, uint32_t count) { cmd->opc = rwcmd; @@ -1092,21 +1092,21 @@ void nvme_ns_rw_cmd(struct nvme_command *cmd, uint32_t } static inline -void nvme_ns_write_cmd(struct nvme_command *cmd, uint16_t nsid, +void nvme_ns_write_cmd(struct nvme_command *cmd, uint32_t nsid, uint64_t lba, uint32_t count) { nvme_ns_rw_cmd(cmd, NVME_OPC_WRITE, nsid, lba, count); } static inline -void nvme_ns_read_cmd(struct nvme_command *cmd, uint16_t nsid, +void nvme_ns_read_cmd(struct nvme_command *cmd, uint32_t nsid, uint64_t lba, uint32_t count) { nvme_ns_rw_cmd(cmd, NVME_OPC_READ, nsid, lba, count); } static inline -void nvme_ns_trim_cmd(struct nvme_command *cmd, uint16_t nsid, +void nvme_ns_trim_cmd(struct nvme_command *cmd, uint32_t nsid, uint32_t num_ranges) { cmd->opc = NVME_OPC_DATASET_MANAGEMENT;