From ec526ea90bcf5b65527c5204a6fdcd1ae4957ca8 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 9 Jul 2013 21:03:39 +0000 Subject: [PATCH] Do not retry failed async event requests. Sponsored by: Intel MFC after: 3 days --- sys/dev/nvme/nvme_ctrlr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index b27a84ecf5dc..771c0d1f9998 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -649,12 +649,12 @@ nvme_ctrlr_async_event_cb(void *arg, const struct nvme_completion *cpl) { struct nvme_async_event_request *aer = arg; - if (cpl->status.sc == NVME_SC_ABORTED_SQ_DELETION) { + if (nvme_completion_is_error(cpl)) { /* - * This is simulated when controller is being shut down, to - * effectively abort outstanding asynchronous event requests - * and make sure all memory is freed. Do not repost the - * request in this case. + * Do not retry failed async event requests. This avoids + * infinite loops where a new async event request is submitted + * to replace the one just failed, only to fail again and + * perpetuate the loop. */ return; }