linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Alan Adamson <alan.adamson@oracle.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Cc: "kbusch@kernel.org" <kbusch@kernel.org>,
	"axboe@fb.com" <axboe@fb.com>, "hch@lst.de" <hch@lst.de>,
	"sagi@grimberg.me" <sagi@grimberg.me>
Subject: Re: [PATCH 0/1] nvme: Export CSTS register via sysfs
Date: Thu, 18 Mar 2021 01:06:19 +0000	[thread overview]
Message-ID: <BYAPR04MB4965B0A515184892C73FB32586699@BYAPR04MB4965.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20210317204615.13971-1-alan.adamson@oracle.com

On 3/17/21 14:05, Alan Adamson wrote:
> This patch exports the NVMe Controller CSTS register via sysfs.  This
> feature can be used by userland executables that accessed CSTS and
> possibly other registers by mapping them into user space.  Since this ability
> may not always available, exporting certain registers via sysfs provides
> a safe/read-only way to access registers from outside the kernel.
>
> Testing:
>
> # Controller in the RDY state
> # cat /sys/devices/pci0000:00/0000:00:04.0/nvme/nvme0/csts
> 1
>
> # Controller in the FAILED state
> # cat /sys/devices/pci0000:00/0000:00:04.0/nvme/nvme0/csts
> 2
>
> # A virtualized csts register can be accessed for fabric devices 
> # cat /sys/devices/virtual/nvme-fabrics/ctl/nvme1/csts
> 1
>
> Alan Adamson (1):
>   Export CSTS register via sysfs
>
>  drivers/nvme/host/core.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>

This patch looks good the usecase mentioned, but I'd really like to
see blktests for this since we are exporting it to userspace.



_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  parent reply	other threads:[~2021-03-18  1:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 20:46 [PATCH 0/1] nvme: Export CSTS register via sysfs Alan Adamson
2021-03-17 20:46 ` [PATCH 1/1] " Alan Adamson
2021-03-18  1:06 ` Chaitanya Kulkarni [this message]
2021-03-18  4:38 ` [PATCH 0/1] " Christoph Hellwig
2021-03-18 14:19   ` Keith Busch
2021-03-18 16:28   ` Alan Adamson
2021-03-18 16:52     ` Keith Busch
2021-03-18 18:39       ` Alan Adamson
2021-03-18 19:46         ` Keith Busch
2021-03-19  6:51           ` Christoph Hellwig
2021-03-19 15:22             ` Keith Busch
2021-03-19 15:30               ` Christoph Hellwig
2021-03-19 17:21                 ` Alan Adamson
2021-03-19 17:30                   ` Keith Busch
2021-03-19 17:33                     ` Alan Adamson
2021-05-05 18:40                     ` Alan Adamson
2021-05-05 20:11                       ` Keith Busch
2021-05-05 20:23                         ` Alan Adamson
2021-05-05 20:35                           ` Keith Busch
2021-03-18 19:15       ` Chaitanya Kulkarni

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=BYAPR04MB4965B0A515184892C73FB32586699@BYAPR04MB4965.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=alan.adamson@oracle.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).