+7
-4
drivers/nvme/host/core.c
+7
-4
drivers/nvme/host/core.c
···
1060
1060
1061
1061
static void nvme_enable_aen(struct nvme_ctrl *ctrl)
1062
1062
{
1063
-
u32 result;
1063
+
u32 result, supported_aens = ctrl->oaes & NVME_AEN_SUPPORTED;
1064
1064
int status;
1065
1065
1066
-
status = nvme_set_features(ctrl, NVME_FEAT_ASYNC_EVENT,
1067
-
ctrl->oaes & NVME_AEN_SUPPORTED, NULL, 0, &result);
1066
+
if (!supported_aens)
1067
+
return;
1068
+
1069
+
status = nvme_set_features(ctrl, NVME_FEAT_ASYNC_EVENT, supported_aens,
1070
+
NULL, 0, &result);
1068
1071
if (status)
1069
1072
dev_warn(ctrl->device, "Failed to configure AEN (cfg %x)\n",
1070
-
ctrl->oaes & NVME_AEN_SUPPORTED);
1073
+
supported_aens);
1071
1074
}
1072
1075
1073
1076
static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)