]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nvme: move struct nvme_iod to pci.c
authorChristoph Hellwig <hch@lst.de>
Fri, 16 Oct 2015 05:58:32 +0000 (07:58 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 1 Dec 2015 17:59:38 +0000 (10:59 -0700)
This structure is specific to the PCIe driver internals and should be moved
to pci.c.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c

index fdb4e5bad9ac73c59c67e70100aba411d124ab2e..2cead2c9816309fd97bcff6a11a391927d401cb2 100644 (file)
@@ -94,23 +94,6 @@ struct nvme_ns {
        u32 mode_select_block_len;
 };
 
-/*
- * The nvme_iod describes the data in an I/O, including the list of PRP
- * entries.  You can't see it in this data structure because C doesn't let
- * me express that.  Use nvme_alloc_iod to ensure there's enough space
- * allocated to store the PRP list.
- */
-struct nvme_iod {
-       unsigned long private;  /* For the use of the submitter of the I/O */
-       int npages;             /* In the PRP list. 0 means small pool in use */
-       int offset;             /* Of PRP list */
-       int nents;              /* Used in scatterlist */
-       int length;             /* Of data, in bytes */
-       dma_addr_t first_dma;
-       struct scatterlist meta_sg[1]; /* metadata requires single contiguous buffer */
-       struct scatterlist sg[0];
-};
-
 static inline u64 nvme_block_nr(struct nvme_ns *ns, sector_t sector)
 {
        return (sector >> (ns->lba_shift - 9));
index b8a02221233cdb27b94191744dd5d7d8f277447c..0f24d3c531c0252e36b5d3b8b5dc6c546b9867b9 100644 (file)
@@ -129,6 +129,23 @@ struct nvme_queue {
        struct async_cmd_info cmdinfo;
 };
 
+/*
+ * The nvme_iod describes the data in an I/O, including the list of PRP
+ * entries.  You can't see it in this data structure because C doesn't let
+ * me express that.  Use nvme_alloc_iod to ensure there's enough space
+ * allocated to store the PRP list.
+ */
+struct nvme_iod {
+       unsigned long private;  /* For the use of the submitter of the I/O */
+       int npages;             /* In the PRP list. 0 means small pool in use */
+       int offset;             /* Of PRP list */
+       int nents;              /* Used in scatterlist */
+       int length;             /* Of data, in bytes */
+       dma_addr_t first_dma;
+       struct scatterlist meta_sg[1]; /* metadata requires single contiguous buffer */
+       struct scatterlist sg[0];
+};
+
 /*
  * Check we didin't inadvertently grow the command struct
  */