Module Name: src
Committed By: yamaguchi
Date: Wed Oct 11 04:29:47 UTC 2023
Modified Files:
src/sys/dev/pci: if_ixl.c
Log Message:
ixl(4): use cv_broadcast to wakeup ioctl and workqueue context.
Commands may be issued at the same time from the both context.
To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/dev/pci/if_ixl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_ixl.c
diff -u src/sys/dev/pci/if_ixl.c:1.90 src/sys/dev/pci/if_ixl.c:1.91
--- src/sys/dev/pci/if_ixl.c:1.90 Wed Oct 11 04:24:24 2023
+++ src/sys/dev/pci/if_ixl.c Wed Oct 11 04:29:47 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ixl.c,v 1.90 2023/10/11 04:24:24 yamaguchi Exp $ */
+/* $NetBSD: if_ixl.c,v 1.91 2023/10/11 04:29:47 yamaguchi Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.90 2023/10/11 04:24:24 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.91 2023/10/11 04:29:47 yamaguchi Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -3840,7 +3840,7 @@ ixl_wakeup(struct ixl_softc *sc, const s
KASSERT(mutex_owned(&sc->sc_atq_lock));
- cv_signal(&sc->sc_atq_cv);
+ cv_broadcast(&sc->sc_atq_cv);
}
static int
@@ -3869,8 +3869,12 @@ ixl_atq_exec_locked(struct ixl_softc *sc
if (error)
return error;
- error = cv_timedwait(&sc->sc_atq_cv, &sc->sc_atq_lock,
- IXL_ATQ_EXEC_TIMEOUT);
+ do {
+ error = cv_timedwait(&sc->sc_atq_cv, &sc->sc_atq_lock,
+ IXL_ATQ_EXEC_TIMEOUT);
+ if (error == EWOULDBLOCK)
+ break;
+ } while (iatq->iatq_inuse);
return error;
}