summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme_qpair.c
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-06-26 23:27:17 +0000
committerjimharris <jimharris@FreeBSD.org>2013-06-26 23:27:17 +0000
commit8579bd1923c5d6c8b60bfa330095859b28a60ac3 (patch)
treebc5b2877c88bcf3817147158378aec515354c12b /sys/dev/nvme/nvme_qpair.c
parent4d63e9a6042335ac179666efa53e626cb0d723c3 (diff)
downloadFreeBSD-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_qpair.c')
-rw-r--r--sys/dev/nvme/nvme_qpair.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
index b9bc027..53e5c1e 100644
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -460,7 +460,7 @@ nvme_qpair_msix_handler(void *arg)
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, struct nvme_controller *ctrlr)
+ struct nvme_controller *ctrlr)
{
struct nvme_tracker *tr;
uint32_t i;
@@ -478,7 +478,6 @@ nvme_qpair_construct(struct nvme_qpair *qpair, uint32_t id,
num_trackers = min(num_trackers, 64);
#endif
qpair->num_trackers = num_trackers;
- qpair->max_xfer_size = max_xfer_size;
qpair->ctrlr = ctrlr;
if (ctrlr->msix_enabled) {
@@ -501,8 +500,8 @@ nvme_qpair_construct(struct nvme_qpair *qpair, uint32_t id,
bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev),
sizeof(uint64_t), PAGE_SIZE, BUS_SPACE_MAXADDR,
- BUS_SPACE_MAXADDR, NULL, NULL, qpair->max_xfer_size,
- (qpair->max_xfer_size/PAGE_SIZE)+1, PAGE_SIZE, 0,
+ BUS_SPACE_MAXADDR, NULL, NULL, NVME_MAX_XFER_SIZE,
+ (NVME_MAX_XFER_SIZE/PAGE_SIZE)+1, PAGE_SIZE, 0,
NULL, NULL, &qpair->dma_tag);
qpair->num_cmds = 0;
OpenPOWER on IntegriCloud