summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme_qpair.c
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-03-26 20:02:35 +0000
committerjimharris <jimharris@FreeBSD.org>2013-03-26 20:02:35 +0000
commit83032bc2394df6e15ddb874995f794f0c8c660b1 (patch)
tree5ebc789383fbca5abbead81ca4e0081cc57c742d /sys/dev/nvme/nvme_qpair.c
parent711dabaf432762eec4942b5f5f7611e7df825260 (diff)
downloadFreeBSD-src-83032bc2394df6e15ddb874995f794f0c8c660b1.zip
FreeBSD-src-83032bc2394df6e15ddb874995f794f0c8c660b1.tar.gz
Add a tunable for the I/O timeout interval. Default is still 30 seconds,
but can be adjusted between a min/max of 5 and 120 seconds. Sponsored by: Intel Reviewed by: carl
Diffstat (limited to 'sys/dev/nvme/nvme_qpair.c')
-rw-r--r--sys/dev/nvme/nvme_qpair.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
index db9abf2..9783db9 100644
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -480,20 +480,23 @@ nvme_timeout(void *arg)
void
nvme_qpair_submit_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr)
{
- struct nvme_request *req;
+ struct nvme_request *req;
+ struct nvme_controller *ctrlr;
mtx_assert(&qpair->lock, MA_OWNED);
req = tr->req;
req->cmd.cid = tr->cid;
qpair->act_tr[tr->cid] = tr;
+ ctrlr = qpair->ctrlr;
- if (req->timeout > 0)
+ if (req->timeout)
#if __FreeBSD_version >= 800030
- callout_reset_curcpu(&tr->timer, req->timeout * hz,
+ callout_reset_curcpu(&tr->timer, ctrlr->timeout_period * hz,
nvme_timeout, tr);
#else
- callout_reset(&tr->timer, req->timeout * hz, nvme_timeout, tr);
+ callout_reset(&tr->timer, ctrlr->timeout_period * hz,
+ nvme_timeout, tr);
#endif
/* Copy the command from the tracker to the submission queue. */
OpenPOWER on IntegriCloud