From 8579bd1923c5d6c8b60bfa330095859b28a60ac3 Mon Sep 17 00:00:00 2001 From: jimharris Date: Wed, 26 Jun 2013 23:27:17 +0000 Subject: 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 --- sys/dev/nvme/nvme_qpair.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/dev/nvme/nvme_qpair.c') 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; -- cgit v1.1