Skip to content

Commit 521cfb8

Browse files
ChaitanayaKulkarniChristoph Hellwig
authored andcommitted
nvme: trace all async notice events
This patch removes the tracing of the NVMe Async events out of the switch so that it can trace all the events including the ones which are not handled in the nvme_handle_aen_notice(). The events which are not handled in the nvme_handle_aen_notice() such as NVME_AER_NOTICE_DISC_CHANGED corresponding event identifier needs to be added in the drivers/nvme/host/trace.h so that it can stringify the AER . Signed-off-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 9581ae4 commit 521cfb8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/nvme/host/core.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3604,19 +3604,18 @@ static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
36043604
{
36053605
u32 aer_notice_type = (result & 0xff00) >> 8;
36063606

3607+
trace_nvme_async_event(ctrl, aer_notice_type);
3608+
36073609
switch (aer_notice_type) {
36083610
case NVME_AER_NOTICE_NS_CHANGED:
3609-
trace_nvme_async_event(ctrl, aer_notice_type);
36103611
set_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events);
36113612
nvme_queue_scan(ctrl);
36123613
break;
36133614
case NVME_AER_NOTICE_FW_ACT_STARTING:
3614-
trace_nvme_async_event(ctrl, aer_notice_type);
36153615
queue_work(nvme_wq, &ctrl->fw_act_work);
36163616
break;
36173617
#ifdef CONFIG_NVME_MULTIPATH
36183618
case NVME_AER_NOTICE_ANA:
3619-
trace_nvme_async_event(ctrl, aer_notice_type);
36203619
if (!ctrl->ana_log_buf)
36213620
break;
36223621
queue_work(nvme_wq, &ctrl->ana_work);

drivers/nvme/host/trace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ TRACE_EVENT(nvme_async_event,
167167
aer_name(NVME_AER_NOTICE_NS_CHANGED),
168168
aer_name(NVME_AER_NOTICE_ANA),
169169
aer_name(NVME_AER_NOTICE_FW_ACT_STARTING),
170+
aer_name(NVME_AER_NOTICE_DISC_CHANGED),
170171
aer_name(NVME_AER_ERROR),
171172
aer_name(NVME_AER_SMART),
172173
aer_name(NVME_AER_CSS),

0 commit comments

Comments
 (0)