* Re: [PATCH] nvme-core: don't use NVME_NSID_ALL for cmd-effect
[not found] <20200922194938.51845-1-chaitanya.kulkarni@wdc.com>
@ 2020-09-22 21:04 ` Chaitanya Kulkarni
2020-09-23 17:35 ` Keith Busch
0 siblings, 1 reply; 3+ messages in thread
From: Chaitanya Kulkarni @ 2020-09-22 21:04 UTC (permalink / raw)
To: hch@lst.de, kbusch@kernel.org, sagi@grimberg.me
Cc: linux-nvme@lists.infradead.org, Huai-Cheng Kuo
(+ cc: linux-nvme)
On 9/22/20 12:49, Chaitanya Kulkarni wrote:
> In the function nvme_get_effects_log() it uses NVME_NSID_ALL which has
> namespace scope. The command effect log page is controller specific.
>
> Replace NVME_NSID_ALL with 0x00 which specifies the controller scope
> instead of namespace scope.
>
> Reported-by: Huai-Cheng Kuo <hh81478072@gmail.com>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=209287
> Fixes: be93e87e7802 ("nvme: support for multiple Command Sets Supported and Effects log pages")
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> ---
> drivers/nvme/host/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 9beb9c94eeef..0d4713307724 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -3041,7 +3041,7 @@ static int nvme_get_effects_log(struct nvme_ctrl *ctrl, u8 csi,
> if (!cel)
> return -ENOMEM;
>
> - ret = nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_CMD_EFFECTS, 0, csi,
> + ret = nvme_get_log(ctrl, 0x00, NVME_LOG_CMD_EFFECTS, 0, csi,
> &cel->log, sizeof(cel->log), 0);
> if (ret) {
> kfree(cel);
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-core: don't use NVME_NSID_ALL for cmd-effect
2020-09-22 21:04 ` [PATCH] nvme-core: don't use NVME_NSID_ALL for cmd-effect Chaitanya Kulkarni
@ 2020-09-23 17:35 ` Keith Busch
2020-09-23 18:02 ` hch
0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2020-09-23 17:35 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: linux-nvme@lists.infradead.org, hch@lst.de, Huai-Cheng Kuo,
sagi@grimberg.me
On Tue, Sep 22, 2020 at 09:04:36PM +0000, Chaitanya Kulkarni wrote:
> In the function nvme_get_effects_log() it uses NVME_NSID_ALL which has
> namespace scope. The command effect log page is controller specific.
>
> Replace NVME_NSID_ALL with 0x00 which specifies the controller scope
> instead of namespace scope.
>
> Reported-by: Huai-Cheng Kuo <hh81478072@gmail.com>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=209287
> Fixes: be93e87e7802 ("nvme: support for multiple Command Sets Supported and Effects log pages")
This is actually the wrong fixes tag. The code was simply carried
forward from 84fef62d135b6.
But otherwise, yes, this looks correct.
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> ---
> drivers/nvme/host/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 9beb9c94eeef..0d4713307724 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -3041,7 +3041,7 @@ static int nvme_get_effects_log(struct nvme_ctrl *ctrl, u8 csi,
> if (!cel)
> return -ENOMEM;
>
> - ret = nvme_get_log(ctrl, NVME_NSID_ALL, NVME_LOG_CMD_EFFECTS, 0, csi,
> + ret = nvme_get_log(ctrl, 0x00, NVME_LOG_CMD_EFFECTS, 0, csi,
> &cel->log, sizeof(cel->log), 0);
> if (ret) {
> kfree(cel);
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-core: don't use NVME_NSID_ALL for cmd-effect
2020-09-23 17:35 ` Keith Busch
@ 2020-09-23 18:02 ` hch
0 siblings, 0 replies; 3+ messages in thread
From: hch @ 2020-09-23 18:02 UTC (permalink / raw)
To: Keith Busch
Cc: linux-nvme@lists.infradead.org, Huai-Cheng Kuo, hch@lst.de,
Chaitanya Kulkarni, sagi@grimberg.me
On Wed, Sep 23, 2020 at 10:35:44AM -0700, Keith Busch wrote:
> On Tue, Sep 22, 2020 at 09:04:36PM +0000, Chaitanya Kulkarni wrote:
> > In the function nvme_get_effects_log() it uses NVME_NSID_ALL which has
> > namespace scope. The command effect log page is controller specific.
> >
> > Replace NVME_NSID_ALL with 0x00 which specifies the controller scope
> > instead of namespace scope.
> >
> > Reported-by: Huai-Cheng Kuo <hh81478072@gmail.com>
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=209287
> > Fixes: be93e87e7802 ("nvme: support for multiple Command Sets Supported and Effects log pages")
>
> This is actually the wrong fixes tag. The code was simply carried
> forward from 84fef62d135b6.
>
> But otherwise, yes, this looks correct.
I've fixed up the fixes tag in the nvme-5.9 branch.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-23 18:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200922194938.51845-1-chaitanya.kulkarni@wdc.com>
2020-09-22 21:04 ` [PATCH] nvme-core: don't use NVME_NSID_ALL for cmd-effect Chaitanya Kulkarni
2020-09-23 17:35 ` Keith Busch
2020-09-23 18:02 ` hch
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.