Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>

authored by

Chaitanya Kulkarni and committed by
Christoph Hellwig
521cfb8e 9581ae4f

+3 -3
+2 -3
drivers/nvme/host/core.c
··· 3604 3604 { 3605 3605 u32 aer_notice_type = (result & 0xff00) >> 8; 3606 3606 3607 + trace_nvme_async_event(ctrl, aer_notice_type); 3608 + 3607 3609 switch (aer_notice_type) { 3608 3610 case NVME_AER_NOTICE_NS_CHANGED: 3609 - trace_nvme_async_event(ctrl, aer_notice_type); 3610 3611 set_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events); 3611 3612 nvme_queue_scan(ctrl); 3612 3613 break; 3613 3614 case NVME_AER_NOTICE_FW_ACT_STARTING: 3614 - trace_nvme_async_event(ctrl, aer_notice_type); 3615 3615 queue_work(nvme_wq, &ctrl->fw_act_work); 3616 3616 break; 3617 3617 #ifdef CONFIG_NVME_MULTIPATH 3618 3618 case NVME_AER_NOTICE_ANA: 3619 - trace_nvme_async_event(ctrl, aer_notice_type); 3620 3619 if (!ctrl->ana_log_buf) 3621 3620 break; 3622 3621 queue_work(nvme_wq, &ctrl->ana_work);
+1
drivers/nvme/host/trace.h
··· 167 167 aer_name(NVME_AER_NOTICE_NS_CHANGED), 168 168 aer_name(NVME_AER_NOTICE_ANA), 169 169 aer_name(NVME_AER_NOTICE_FW_ACT_STARTING), 170 + aer_name(NVME_AER_NOTICE_DISC_CHANGED), 170 171 aer_name(NVME_AER_ERROR), 171 172 aer_name(NVME_AER_SMART), 172 173 aer_name(NVME_AER_CSS),