* [PATCH] nvme: fix async event trace event
@ 2023-04-05 21:57 Keith Busch
2023-04-05 22:02 ` Keith Busch
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Keith Busch @ 2023-04-05 21:57 UTC (permalink / raw)
To: linux-nvme, hch; +Cc: sagi, Keith Busch, Nate Thornton, Chaitanya Kulkarni
From: Keith Busch <kbusch@kernel.org>
Mixing AER Event Type and Event Info has masking clashes. Just print the
event type, but also include the event info of the AER result in the
trace.
Fixes: 09bd1ff4b15143b ("nvme-core: add async event trace helper")
Reported-by: Nate Thornton <nate.thornton@samsung.com>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
drivers/nvme/host/core.c | 5 +----
drivers/nvme/host/trace.h | 15 ++++++---------
2 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index d6a9bac91a4cd..bdf1601219fc4 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -4819,8 +4819,6 @@ static bool nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
u32 aer_notice_type = nvme_aer_subtype(result);
bool requeue = true;
- trace_nvme_async_event(ctrl, aer_notice_type);
-
switch (aer_notice_type) {
case NVME_AER_NOTICE_NS_CHANGED:
set_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events);
@@ -4856,7 +4854,6 @@ static bool nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
static void nvme_handle_aer_persistent_error(struct nvme_ctrl *ctrl)
{
- trace_nvme_async_event(ctrl, NVME_AER_ERROR);
dev_warn(ctrl->device, "resetting controller due to AER\n");
nvme_reset_ctrl(ctrl);
}
@@ -4872,6 +4869,7 @@ void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
if (le16_to_cpu(status) >> 1 != NVME_SC_SUCCESS)
return;
+ trace_nvme_async_event(ctrl, result);
switch (aer_type) {
case NVME_AER_NOTICE:
requeue = nvme_handle_aen_notice(ctrl, result);
@@ -4889,7 +4887,6 @@ void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
case NVME_AER_SMART:
case NVME_AER_CSS:
case NVME_AER_VS:
- trace_nvme_async_event(ctrl, aer_type);
ctrl->aen_result = result;
break;
default:
diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h
index 6f0eaf6a15282..4fb5922ffdac5 100644
--- a/drivers/nvme/host/trace.h
+++ b/drivers/nvme/host/trace.h
@@ -127,15 +127,12 @@ TRACE_EVENT(nvme_async_event,
),
TP_printk("nvme%d: NVME_AEN=%#08x [%s]",
__entry->ctrl_id, __entry->result,
- __print_symbolic(__entry->result,
- aer_name(NVME_AER_NOTICE_NS_CHANGED),
- aer_name(NVME_AER_NOTICE_ANA),
- aer_name(NVME_AER_NOTICE_FW_ACT_STARTING),
- aer_name(NVME_AER_NOTICE_DISC_CHANGED),
- aer_name(NVME_AER_ERROR),
- aer_name(NVME_AER_SMART),
- aer_name(NVME_AER_CSS),
- aer_name(NVME_AER_VS))
+ __print_symbolic(__entry->result & 0x7,
+ aer_name(NVME_AER_ERROR),
+ aer_name(NVME_AER_SMART),
+ aer_name(NVME_AER_NOTICE),
+ aer_name(NVME_AER_CSS),
+ aer_name(NVME_AER_VS))
)
);
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] nvme: fix async event trace event
2023-04-05 21:57 [PATCH] nvme: fix async event trace event Keith Busch
@ 2023-04-05 22:02 ` Keith Busch
2023-04-05 22:26 ` Minwoo Im
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Keith Busch @ 2023-04-05 22:02 UTC (permalink / raw)
To: Keith Busch; +Cc: linux-nvme, hch, sagi, Nate Thornton, Chaitanya Kulkarni
On Wed, Apr 05, 2023 at 02:57:20PM -0700, Keith Busch wrote:
> Reported-by: Nate Thornton <nate.thornton@samsung.com>
Well, no idea if this is a real email address, though it's a copy-paste from
the "From" in the original report. Getting this error:
The mail system
<nate.thornton@samsung.com>: host mailin.samsung.com[203.254.224.12] said: 550
5.1.1 Recipient address rejected: User unknown (in reply to RCPT TO
command)
Regardless, patch should be fine.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] nvme: fix async event trace event
2023-04-05 21:57 [PATCH] nvme: fix async event trace event Keith Busch
2023-04-05 22:02 ` Keith Busch
@ 2023-04-05 22:26 ` Minwoo Im
2023-04-06 0:22 ` Chaitanya Kulkarni
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Minwoo Im @ 2023-04-05 22:26 UTC (permalink / raw)
To: linux-nvme, Keith Busch, hch
Cc: sagi, Keith Busch, Nate Thornton, Chaitanya Kulkarni
On April 6, 2023 6:57:20 AM GMT+09:00, Keith Busch <kbusch@meta.com> wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> Mixing AER Event Type and Event Info has masking clashes. Just print the
> event type, but also include the event info of the AER result in the
> trace.
>
> Fixes: 09bd1ff4b15143b ("nvme-core: add async event trace helper")
> Reported-by: Nate Thornton <nate.thornton@samsung.com>
> Cc: Chaitanya Kulkarni <kch@nvidia.com>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] nvme: fix async event trace event
2023-04-05 21:57 [PATCH] nvme: fix async event trace event Keith Busch
2023-04-05 22:02 ` Keith Busch
2023-04-05 22:26 ` Minwoo Im
@ 2023-04-06 0:22 ` Chaitanya Kulkarni
2023-04-07 21:29 ` Sagi Grimberg
2023-04-11 6:08 ` Christoph Hellwig
4 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2023-04-06 0:22 UTC (permalink / raw)
To: Keith Busch, linux-nvme@lists.infradead.org
Cc: sagi@grimberg.me, Keith Busch, hch@lst.de, Nate Thornton,
Chaitanya Kulkarni
On 4/5/23 14:57, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> Mixing AER Event Type and Event Info has masking clashes. Just print the
> event type, but also include the event info of the AER result in the
> trace.
>
> Fixes: 09bd1ff4b15143b ("nvme-core: add async event trace helper")
> Reported-by: Nate Thornton <nate.thornton@samsung.com>
> Cc: Chaitanya Kulkarni <kch@nvidia.com>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
thanks for fixing this, looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] nvme: fix async event trace event
2023-04-05 21:57 [PATCH] nvme: fix async event trace event Keith Busch
` (2 preceding siblings ...)
2023-04-06 0:22 ` Chaitanya Kulkarni
@ 2023-04-07 21:29 ` Sagi Grimberg
2023-04-11 6:08 ` Christoph Hellwig
4 siblings, 0 replies; 6+ messages in thread
From: Sagi Grimberg @ 2023-04-07 21:29 UTC (permalink / raw)
To: Keith Busch, linux-nvme, hch
Cc: Keith Busch, Nate Thornton, Chaitanya Kulkarni
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] nvme: fix async event trace event
2023-04-05 21:57 [PATCH] nvme: fix async event trace event Keith Busch
` (3 preceding siblings ...)
2023-04-07 21:29 ` Sagi Grimberg
@ 2023-04-11 6:08 ` Christoph Hellwig
4 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2023-04-11 6:08 UTC (permalink / raw)
To: Keith Busch
Cc: linux-nvme, hch, sagi, Keith Busch, Nate Thornton,
Chaitanya Kulkarni
Thanks,
applied to nvme-6.4.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-11 6:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05 21:57 [PATCH] nvme: fix async event trace event Keith Busch
2023-04-05 22:02 ` Keith Busch
2023-04-05 22:26 ` Minwoo Im
2023-04-06 0:22 ` Chaitanya Kulkarni
2023-04-07 21:29 ` Sagi Grimberg
2023-04-11 6:08 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox