From: willy@linux.intel.com (Matthew Wilcox)
Subject: [PATCH] NVMe: Create module parameter for shutdown timeout.
Date: Sat, 28 Jun 2014 09:00:04 -0400 [thread overview]
Message-ID: <20140628130004.GU12025@linux.intel.com> (raw)
In-Reply-To: <1403256174-3595-1-git-send-email-daniel.mcleran@intel.com>
On Fri, Jun 20, 2014@03:22:54AM -0600, Dan McLeran wrote:
> @@ -62,6 +63,10 @@ static unsigned char retry_time = 30;
> module_param(retry_time, byte, 0644);
> MODULE_PARM_DESC(retry_time, "time in seconds to retry failed I/O");
>
> +unsigned char nvme_shutdown_timeout = 5;
> +module_param_named(shutdown_timeout, nvme_shutdown_timeout, byte, 0644);
> +MODULE_PARM_DESC(shutdown_timeout, "timeout in seconds for controller shutdown");
You've copied the pattern for nvme_io_timeout instead of retry_time.
The reason io_timeout has the nvme_ prefix is because it's exposed outside
this file (it's used by nvme-scsi.c). I don't see a reason to expose
shutdown_timeout outside of nvme-core.c, so retry_time is the pattern to
follow here.
> static int nvme_major;
> module_param(nvme_major, int, 0);
>
> @@ -1428,7 +1433,7 @@ static int nvme_shutdown_ctrl(struct nvme_dev *dev)
> cc = (readl(&dev->bar->cc) & ~NVME_CC_SHN_MASK) | NVME_CC_SHN_NORMAL;
> writel(cc, &dev->bar->cc);
>
> - timeout = 2 * HZ + jiffies;
> + timeout = SHUTDOWN_TIMEOUT + jiffies;
> while ((readl(&dev->bar->csts) & NVME_CSTS_SHST_MASK) !=
> NVME_CSTS_SHST_CMPLT) {
> msleep(100);
> --
> 1.7.10.4
>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
prev parent reply other threads:[~2014-06-28 13:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 9:22 [PATCH] NVMe: Create module parameter for shutdown timeout Dan McLeran
2014-06-20 17:15 ` Matthew Wilcox
2014-06-20 17:26 ` Mayes, Barrett N
2014-06-20 18:34 ` Mayes, Barrett N
2014-06-28 13:00 ` Matthew Wilcox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140628130004.GU12025@linux.intel.com \
--to=willy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.