diff options
author | jimharris <jimharris@FreeBSD.org> | 2013-03-26 18:31:46 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2013-03-26 18:31:46 +0000 |
commit | 6162f3ce10ed5308a613cd8a0ee5630620fca3c5 (patch) | |
tree | 6f27caef9d57d9c3abb7b8b9c19b12f3c802ccf3 /sys/dev/nvme/nvme_qpair.c | |
parent | b4217411fa1a625c65c98e03e5bad55be3d04b8c (diff) | |
download | FreeBSD-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_qpair.c')
-rw-r--r-- | sys/dev/nvme/nvme_qpair.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index c8f4c54..b7eb032 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -438,11 +438,12 @@ nvme_qpair_submit_cmd(struct nvme_qpair *qpair, struct nvme_tracker *tr) req->cmd.cid = tr->cid; qpair->act_tr[tr->cid] = tr; + if (req->timeout > 0) #if __FreeBSD_version >= 800030 - callout_reset_curcpu(&tr->timer, NVME_TIMEOUT_IN_SEC * hz, - nvme_timeout, tr); + callout_reset_curcpu(&tr->timer, req->timeout * hz, + nvme_timeout, tr); #else - callout_reset(&tr->timer, NVME_TIMEOUT_IN_SEC * hz, nvme_timeout, tr); + callout_reset(&tr->timer, req->timeout * hz, nvme_timeout, tr); #endif /* Copy the command from the tracker to the submission queue. */ |