nvme: Clear the notify flag if the consumer rejects the controller.
While here, fix some type mismatch warnings. Reviewed by: imp Sponsored by: Netapp, Inc. Sponsored by: Klara, Inc. MFC after: 1 week
This commit is contained in:
parent
54b96380f5
commit
9a5acf365d
@ -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;
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user