All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhenwei pi <pizhenwei@bytedance.com>
To: Klaus Jensen <its@irrelevant.dk>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Keith Busch <kbusch@kernel.org>,
	Klaus Jensen <k.jensen@samsung.com>
Subject: Re: [PATCH] hw/nvme: fix smart aen
Date: Fri, 6 May 2022 15:31:20 +0800	[thread overview]
Message-ID: <849547ae-003d-baa8-ac3e-3cb9b60b21b2@bytedance.com> (raw)
In-Reply-To: <20220506063649.13361-1-its@irrelevant.dk>

On 5/6/22 14:36, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
> 
> Pass the right constant to nvme_smart_event(). The NVME_AER* values hold
> the bit position in the SMART byte, not the shifted value that we expect
> it to be in nvme_smart_event().
> 
> Fixes: c62720f137df ("hw/block/nvme: trigger async event during injecting smart warning")
> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> ---
>   hw/nvme/ctrl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
> index 08574c4dcbc8..a2f6069f7fe1 100644
> --- a/hw/nvme/ctrl.c
> +++ b/hw/nvme/ctrl.c
> @@ -5325,7 +5325,7 @@ static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeRequest *req)
>   
>           if ((n->temperature >= n->features.temp_thresh_hi) ||
>               (n->temperature <= n->features.temp_thresh_low)) {
> -            nvme_smart_event(n, NVME_AER_INFO_SMART_TEMP_THRESH);
> +            nvme_smart_event(n, NVME_SMART_TEMPERATURE);
>           }
>   
>           break;

It looks good to me.

Acked-by: zhenwei pi <pizhenwei@bytedance.com>

-- 
zhenwei pi


  reply	other threads:[~2022-05-06  7:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06  6:36 [PATCH] hw/nvme: fix smart aen Klaus Jensen
2022-05-06  7:31 ` zhenwei pi [this message]
2022-05-12  5:39 ` Klaus Jensen

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=849547ae-003d-baa8-ac3e-3cb9b60b21b2@bytedance.com \
    --to=pizhenwei@bytedance.com \
    --cc=its@irrelevant.dk \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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.