summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme_private.h
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-03-26 22:09:51 +0000
committerjimharris <jimharris@FreeBSD.org>2013-03-26 22:09:51 +0000
commit5242be57d3d5eddc6859707cd02c511befa48366 (patch)
tree725967903e5c9ed2b6a4a7806d1dd92c05c26182 /sys/dev/nvme/nvme_private.h
parentff567ee3e1dfdf36fd8473b02ec9e68996b6c960 (diff)
downloadFreeBSD-src-5242be57d3d5eddc6859707cd02c511befa48366.zip
FreeBSD-src-5242be57d3d5eddc6859707cd02c511befa48366.tar.gz
Replace usages of mtx_pool_find used for admin commands with a polling
mechanism. Now that all requests are timed, we are guaranteed to get a completion notification, even if it is an abort status due to a timed out admin command. This has the effect of simplifying the controller and namespace setup code, so that it reads straight through rather than broken up into a bunch of different callback functions. Sponsored by: Intel Reviewed by: carl
Diffstat (limited to 'sys/dev/nvme/nvme_private.h')
-rw-r--r--sys/dev/nvme/nvme_private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index 3523160..8a43f26 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -116,6 +116,12 @@ MALLOC_DECLARE(M_NVME);
extern uma_zone_t nvme_request_zone;
extern int32_t nvme_retry_count;
+struct nvme_completion_poll_status {
+
+ struct nvme_completion cpl;
+ boolean_t done;
+};
+
struct nvme_request {
struct nvme_command cmd;
@@ -399,6 +405,7 @@ void nvme_payload_map(void *arg, bus_dma_segment_t *seg, int nseg,
int error);
void nvme_payload_map_uio(void *arg, bus_dma_segment_t *seg, int nseg,
bus_size_t mapsize, int error);
+void nvme_completion_poll_cb(void *arg, const struct nvme_completion *cpl);
int nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev);
void nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev);
OpenPOWER on IntegriCloud