[PATCH] nvme-core: don't use NVME_NSID_ALL for cmd-effect
Chaitanya Kulkarni
Chaitanya.Kulkarni at wdc.com
Tue Sep 22 17:04:36 EDT 2020
(+ 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 at 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 at 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);
More information about the Linux-nvme
mailing list