From owner-svn-src-all@freebsd.org Fri Aug 25 21:38:40 2017 Return-Path: Delivered-To: svn-src-all@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 78652DE1F0B; Fri, 25 Aug 2017 21:38:40 +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 4A2607185A; Fri, 25 Aug 2017 21:38:40 +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 v7PLcddi088450; Fri, 25 Aug 2017 21:38:39 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7PLcd3q088446; Fri, 25 Aug 2017 21:38:39 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201708252138.v7PLcd3q088446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 25 Aug 2017 21:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322902 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 322902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2017 21:38:40 -0000 Author: imp Date: Fri Aug 25 21:38:38 2017 New Revision: 322902 URL: https://svnweb.freebsd.org/changeset/base/322902 Log: NVME Namespace ID is 32-bits, so widen interface to reflect that. Sponsored by: Netflix Modified: head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/nvme/nvme_ctrlr_cmd.c head/sys/dev/nvme/nvme_ns.c head/sys/dev/nvme/nvme_private.h Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Fri Aug 25 21:38:29 2017 (r322901) +++ head/sys/dev/nvme/nvme_ctrlr.c Fri Aug 25 21:38:38 2017 (r322902) @@ -460,7 +460,7 @@ static int nvme_ctrlr_construct_namespaces(struct nvme_controller *ctrlr) { struct nvme_namespace *ns; - int i; + uint32_t i; for (i = 0; i < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); i++) { ns = &ctrlr->ns[i]; Modified: head/sys/dev/nvme/nvme_ctrlr_cmd.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr_cmd.c Fri Aug 25 21:38:29 2017 (r322901) +++ head/sys/dev/nvme/nvme_ctrlr_cmd.c Fri Aug 25 21:38:38 2017 (r322902) @@ -52,7 +52,7 @@ nvme_ctrlr_cmd_identify_controller(struct nvme_control } void -nvme_ctrlr_cmd_identify_namespace(struct nvme_controller *ctrlr, uint16_t nsid, +nvme_ctrlr_cmd_identify_namespace(struct nvme_controller *ctrlr, uint32_t nsid, void *payload, nvme_cb_fn_t cb_fn, void *cb_arg) { struct nvme_request *req; Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Fri Aug 25 21:38:29 2017 (r322901) +++ head/sys/dev/nvme/nvme_ns.c Fri Aug 25 21:38:38 2017 (r322902) @@ -476,7 +476,7 @@ nvme_ns_bio_process(struct nvme_namespace *ns, struct } int -nvme_ns_construct(struct nvme_namespace *ns, uint16_t id, +nvme_ns_construct(struct nvme_namespace *ns, uint32_t id, struct nvme_controller *ctrlr) { struct nvme_completion_poll_status status; Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Fri Aug 25 21:38:29 2017 (r322901) +++ head/sys/dev/nvme/nvme_private.h Fri Aug 25 21:38:38 2017 (r322902) @@ -225,8 +225,8 @@ struct nvme_namespace { struct nvme_controller *ctrlr; struct nvme_namespace_data data; - uint16_t id; - uint16_t flags; + uint32_t id; + uint32_t flags; struct cdev *cdev; void *cons_cookie[NVME_MAX_CONSUMERS]; uint32_t stripesize; @@ -356,7 +356,7 @@ void nvme_ctrlr_cmd_identify_controller(struct nvme_co void *payload, nvme_cb_fn_t cb_fn, void *cb_arg); void nvme_ctrlr_cmd_identify_namespace(struct nvme_controller *ctrlr, - uint16_t nsid, void *payload, + uint32_t nsid, void *payload, nvme_cb_fn_t cb_fn, void *cb_arg); void nvme_ctrlr_cmd_set_interrupt_coalescing(struct nvme_controller *ctrlr, uint32_t microseconds, @@ -438,7 +438,7 @@ void nvme_io_qpair_enable(struct nvme_qpair *qpair); void nvme_io_qpair_disable(struct nvme_qpair *qpair); void nvme_io_qpair_destroy(struct nvme_qpair *qpair); -int nvme_ns_construct(struct nvme_namespace *ns, uint16_t id, +int nvme_ns_construct(struct nvme_namespace *ns, uint32_t id, struct nvme_controller *ctrlr); void nvme_ns_destruct(struct nvme_namespace *ns);