summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme_private.h
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-03-26 18:31:46 +0000
committerjimharris <jimharris@FreeBSD.org>2013-03-26 18:31:46 +0000
commit6162f3ce10ed5308a613cd8a0ee5630620fca3c5 (patch)
tree6f27caef9d57d9c3abb7b8b9c19b12f3c802ccf3 /sys/dev/nvme/nvme_private.h
parentb4217411fa1a625c65c98e03e5bad55be3d04b8c (diff)
downloadFreeBSD-src-6162f3ce10ed5308a613cd8a0ee5630620fca3c5.zip
FreeBSD-src-6162f3ce10ed5308a613cd8a0ee5630620fca3c5.tar.gz
Specify command timeout interval on a per-command type basis.
This is primarily driven by the need to disable timeouts for asynchronous event requests, which by nature should not be timed out. Sponsored by: Intel
Diffstat (limited to 'sys/dev/nvme/nvme_private.h')
-rw-r--r--sys/dev/nvme/nvme_private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index 69024ba..ca9b565 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -112,6 +112,7 @@ struct nvme_request {
struct nvme_command cmd;
void *payload;
uint32_t payload_size;
+ uint32_t timeout;
struct uio *uio;
nvme_cb_fn_t cb_fn;
void *cb_arg;
@@ -411,6 +412,7 @@ nvme_allocate_request(void *payload, uint32_t payload_size, nvme_cb_fn_t cb_fn,
req->payload_size = payload_size;
req->cb_fn = cb_fn;
req->cb_arg = cb_arg;
+ req->timeout = NVME_TIMEOUT_IN_SEC;
return (req);
}
@@ -427,6 +429,7 @@ nvme_allocate_request_uio(struct uio *uio, nvme_cb_fn_t cb_fn, void *cb_arg)
req->uio = uio;
req->cb_fn = cb_fn;
req->cb_arg = cb_arg;
+ req->timeout = NVME_TIMEOUT_IN_SEC;
return (req);
}
OpenPOWER on IntegriCloud