nvme: do not retry AER if ASYNC_LIMIT_EXCEEDED received
This indicates an out-of-spec device, so just print an error message but don't bother retrying the AER. While here, add status code type (sct) check for the other status code check when an AER fails - it is not enough to compare just the status code. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ibd26549aa08d3eb4814c239b6b2c6fe95e069a54 Reviewed-on: https://review.gerrithub.io/429533 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
136160ad46
commit
073f2dd8f2
@ -1437,7 +1437,8 @@ nvme_ctrlr_async_event_cb(void *arg, const struct spdk_nvme_cpl *cpl)
|
||||
union spdk_nvme_async_event_completion event;
|
||||
int rc;
|
||||
|
||||
if (cpl->status.sc == SPDK_NVME_SC_ABORTED_SQ_DELETION) {
|
||||
if (cpl->status.sct == SPDK_NVME_SCT_GENERIC &&
|
||||
cpl->status.sc == SPDK_NVME_SC_ABORTED_SQ_DELETION) {
|
||||
/*
|
||||
* This is simulated when controller is being shut down, to
|
||||
* effectively abort outstanding asynchronous event requests
|
||||
@ -1447,6 +1448,18 @@ nvme_ctrlr_async_event_cb(void *arg, const struct spdk_nvme_cpl *cpl)
|
||||
return;
|
||||
}
|
||||
|
||||
if (cpl->status.sct == SPDK_NVME_SCT_COMMAND_SPECIFIC &&
|
||||
cpl->status.sc == SPDK_NVME_SC_ASYNC_EVENT_REQUEST_LIMIT_EXCEEDED) {
|
||||
/*
|
||||
* SPDK will only send as many AERs as the device says it supports,
|
||||
* so this status code indicates an out-of-spec device. Do not repost
|
||||
* the request in this case.
|
||||
*/
|
||||
SPDK_ERRLOG("Controller appears out-of-spec for asynchronous event request\n"
|
||||
"handling. Do not repost this AER.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
event.raw = cpl->cdw0;
|
||||
if ((event.bits.async_event_type == SPDK_NVME_ASYNC_EVENT_TYPE_NOTICE) &&
|
||||
(event.bits.async_event_info == SPDK_NVME_ASYNC_EVENT_NS_ATTR_CHANGED)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user