diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index fc491eb72f1c..b75d558a36d5 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -177,8 +177,10 @@ nvme_notify(struct nvme_consumer *cons, ctrlr->cons_cookie[cons->id] = ctrlr_cookie; /* ctrlr_fn has failed. Nothing to notify here any more. */ - if (ctrlr_cookie == NULL) + if (ctrlr_cookie == NULL) { + (void)atomic_cmpset_32(&ctrlr->notification_sent, 1, 0); return; + } if (ctrlr->is_failed) { ctrlr->cons_cookie[cons->id] = NULL; diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index ccc980a7c6ec..196d6f0b35c2 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -2052,7 +2052,7 @@ void nvme_resv_status_swapbytes(struct nvme_resv_status *s __unused, size_t size __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN - u_int i, n; + size_t i, n; s->gen = le32toh(s->gen); n = (s->regctl[1] << 8) | s->regctl[0]; @@ -2070,7 +2070,7 @@ void nvme_resv_status_ext_swapbytes(struct nvme_resv_status_ext *s __unused, size_t size __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN - u_int i, n; + size_t i, n; s->gen = le32toh(s->gen); n = (s->regctl[1] << 8) | s->regctl[0];