Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2017 21:38:39 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r322902 - head/sys/dev/nvme
Message-ID:  <201708252138.v7PLcd3q088446@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708252138.v7PLcd3q088446>