module_param(shutdown_timeout, byte, 0644);
MODULE_PARM_DESC(shutdown_timeout, "timeout in seconds for controller shutdown");
-static unsigned int nvme_max_retries = 5;
-module_param_named(max_retries, nvme_max_retries, uint, 0644);
+static u8 nvme_max_retries = 5;
+module_param_named(max_retries, nvme_max_retries, byte, 0644);
MODULE_PARM_DESC(max_retries, "max number of retries a command may have");
static int nvme_char_major;
return false;
if (jiffies - req->start_time >= req->timeout)
return false;
- if (req->retries >= nvme_max_retries)
+ if (nvme_req(req)->retries >= nvme_max_retries)
return false;
return true;
}
if (unlikely(req->errors)) {
if (nvme_req_needs_retry(req)) {
- req->retries++;
+ nvme_req(req)->retries++;
blk_mq_requeue_request(req,
!blk_mq_queue_stopped(req->q));
return;
int ret = BLK_MQ_RQ_QUEUE_OK;
if (!(req->rq_flags & RQF_DONTPREP)) {
- req->retries = 0;
+ nvme_req(req)->retries = 0;
req->rq_flags |= RQF_DONTPREP;
}