diff options
author | jimharris <jimharris@FreeBSD.org> | 2013-06-26 23:27:17 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2013-06-26 23:27:17 +0000 |
commit | 8579bd1923c5d6c8b60bfa330095859b28a60ac3 (patch) | |
tree | bc5b2877c88bcf3817147158378aec515354c12b /sys/dev/nvme/nvme_private.h | |
parent | 4d63e9a6042335ac179666efa53e626cb0d723c3 (diff) | |
download | FreeBSD-src-8579bd1923c5d6c8b60bfa330095859b28a60ac3.zip FreeBSD-src-8579bd1923c5d6c8b60bfa330095859b28a60ac3.tar.gz |
Use MAXPHYS to specify the maximum I/O size for nvme(4).
Also allow admin commands to transfer up to this maximum I/O size, rather
than the artificial limit previously imposed. The larger I/O size is very
beneficial for upcoming firmware download support. This has the added
benefit of simplifying the code since both admin and I/O commands now use
the same maximum I/O size.
Sponsored by: Intel
MFC after: 3 days
Diffstat (limited to 'sys/dev/nvme/nvme_private.h')
-rw-r--r-- | sys/dev/nvme/nvme_private.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 12d8691..ecc8b34 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -60,8 +60,6 @@ MALLOC_DECLARE(M_NVME); #define IDT32_PCI_ID 0x80d0111d /* 32 channel board */ #define IDT8_PCI_ID 0x80d2111d /* 8 channel board */ -#define NVME_MAX_PRP_LIST_ENTRIES (32) - /* * For commands requiring more than 2 PRP entries, one PRP will be * embedded in the command (prp1), and the rest of the PRP entries @@ -69,7 +67,7 @@ MALLOC_DECLARE(M_NVME); * that real max number of PRP entries we support is 32+1, which * results in a max xfer size of 32*PAGE_SIZE. */ -#define NVME_MAX_XFER_SIZE NVME_MAX_PRP_LIST_ENTRIES * PAGE_SIZE +#define NVME_MAX_PRP_LIST_ENTRIES (NVME_MAX_XFER_SIZE / PAGE_SIZE) #define NVME_ADMIN_TRACKERS (16) #define NVME_ADMIN_ENTRIES (128) @@ -194,7 +192,6 @@ struct nvme_qpair { struct resource *res; void *tag; - uint32_t max_xfer_size; uint32_t num_entries; uint32_t num_trackers; uint32_t sq_tdbl_off; @@ -446,7 +443,7 @@ void nvme_ctrlr_post_failed_request(struct nvme_controller *ctrlr, void nvme_qpair_construct(struct nvme_qpair *qpair, uint32_t id, uint16_t vector, uint32_t num_entries, - uint32_t num_trackers, uint32_t max_xfer_size, + uint32_t num_trackers, struct nvme_controller *ctrlr); void nvme_qpair_submit_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr); |