|
@@ -3408,16 +3408,21 @@ static void nvme_fw_act_work(struct work_struct *work)
|
|
|
|
|
|
static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
|
|
|
{
|
|
|
- switch ((result & 0xff00) >> 8) {
|
|
|
+ u32 aer_notice_type = (result & 0xff00) >> 8;
|
|
|
+
|
|
|
+ switch (aer_notice_type) {
|
|
|
case NVME_AER_NOTICE_NS_CHANGED:
|
|
|
+ trace_nvme_async_event(ctrl, aer_notice_type);
|
|
|
set_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events);
|
|
|
nvme_queue_scan(ctrl);
|
|
|
break;
|
|
|
case NVME_AER_NOTICE_FW_ACT_STARTING:
|
|
|
+ trace_nvme_async_event(ctrl, aer_notice_type);
|
|
|
queue_work(nvme_wq, &ctrl->fw_act_work);
|
|
|
break;
|
|
|
#ifdef CONFIG_NVME_MULTIPATH
|
|
|
case NVME_AER_NOTICE_ANA:
|
|
|
+ trace_nvme_async_event(ctrl, aer_notice_type);
|
|
|
if (!ctrl->ana_log_buf)
|
|
|
break;
|
|
|
queue_work(nvme_wq, &ctrl->ana_work);
|
|
@@ -3432,11 +3437,12 @@ void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
|
|
|
volatile union nvme_result *res)
|
|
|
{
|
|
|
u32 result = le32_to_cpu(res->u32);
|
|
|
+ u32 aer_type = result & 0x07;
|
|
|
|
|
|
if (le16_to_cpu(status) >> 1 != NVME_SC_SUCCESS)
|
|
|
return;
|
|
|
|
|
|
- switch (result & 0x7) {
|
|
|
+ switch (aer_type) {
|
|
|
case NVME_AER_NOTICE:
|
|
|
nvme_handle_aen_notice(ctrl, result);
|
|
|
break;
|
|
@@ -3444,6 +3450,7 @@ 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:
|