aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/core.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2021-04-16 13:46:21 +0200
committerChristoph Hellwig <hch@lst.de>2021-04-21 19:13:15 +0200
commit74c22990f08c9f922f775939a4ebc814ca2c49eb (patch)
treec226115a5d6ec360d6cb1d4427054ad0eadab1c9 /drivers/nvme/host/core.c
parentnvme: sanitize KATO setting (diff)
downloadlinux-dev-74c22990f08c9f922f775939a4ebc814ca2c49eb.tar.xz
linux-dev-74c22990f08c9f922f775939a4ebc814ca2c49eb.zip
nvme: add 'kato' sysfs attribute
Add a 'kato' controller sysfs attribute to display the current keep-alive timeout value (if any). This allows userspace to identify persistent discovery controllers, as these will have a non-zero KATO value. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/core.c')
-rw-r--r--drivers/nvme/host/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 0cb097cd6a8e..d6fd44774e9f 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3172,6 +3172,7 @@ nvme_show_int_function(cntlid);
nvme_show_int_function(numa_node);
nvme_show_int_function(queue_count);
nvme_show_int_function(sqsize);
+nvme_show_int_function(kato);
static ssize_t nvme_sysfs_delete(struct device *dev,
struct device_attribute *attr, const char *buf,
@@ -3369,6 +3370,7 @@ static struct attribute *nvme_dev_attrs[] = {
&dev_attr_ctrl_loss_tmo.attr,
&dev_attr_reconnect_delay.attr,
&dev_attr_fast_io_fail_tmo.attr,
+ &dev_attr_kato.attr,
NULL
};