diff options
author | Josh Paetzel <jpaetzel@FreeBSD.org> | 2013-02-14 17:34:17 +0000 |
---|---|---|
committer | Josh Paetzel <jpaetzel@FreeBSD.org> | 2013-02-14 17:34:17 +0000 |
commit | beb0f7e7d4eeaec7c44855ab2eeb8197b9403c95 (patch) | |
tree | 3fbd8943385908b10b8534bd22ba6add71caddd2 /sys/dev/oce | |
parent | 3c4223a65aaf232b4894657c9d105a799114995c (diff) | |
download | src-beb0f7e7d4eeaec7c44855ab2eeb8197b9403c95.tar.gz src-beb0f7e7d4eeaec7c44855ab2eeb8197b9403c95.zip |
Resolve issue that caused WITNESS to report LORs.
PR: kern/171838
Submitted by: Venkat Duvvuru <venkatduvvuru.ml@gmail.com>
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=246799
Diffstat (limited to 'sys/dev/oce')
-rw-r--r-- | sys/dev/oce/oce_if.c | 9 | ||||
-rw-r--r-- | sys/dev/oce/oce_if.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/oce/oce_if.c b/sys/dev/oce/oce_if.c index 2b4c181bef6e..426acd9fe9ae 100644 --- a/sys/dev/oce/oce_if.c +++ b/sys/dev/oce/oce_if.c @@ -1817,6 +1817,9 @@ oce_local_timer(void *arg) } +/* NOTE : This should only be called holding + * DEVICE_LOCK. +*/ static void oce_if_deactivate(POCE_SOFTC sc) { @@ -1846,11 +1849,17 @@ oce_if_deactivate(POCE_SOFTC sc) /* Stop intrs and finish any bottom halves pending */ oce_hw_intr_disable(sc); + /* Since taskqueue_drain takes a Giant Lock, We should not acquire + any other lock. So unlock device lock and require after + completing taskqueue_drain. + */ + UNLOCK(&sc->dev_lock); for (i = 0; i < sc->intr_count; i++) { if (sc->intrs[i].tq != NULL) { taskqueue_drain(sc->intrs[i].tq, &sc->intrs[i].task); } } + LOCK(&sc->dev_lock); /* Delete RX queue in card with flush param */ oce_stop_rx(sc); diff --git a/sys/dev/oce/oce_if.h b/sys/dev/oce/oce_if.h index cd3553147174..6428f884bd49 100644 --- a/sys/dev/oce/oce_if.h +++ b/sys/dev/oce/oce_if.h @@ -493,7 +493,7 @@ struct oce_lock { #define LOCK_CREATE(lock, desc) { \ strncpy((lock)->name, (desc), MAX_LOCK_DESC_LEN); \ (lock)->name[MAX_LOCK_DESC_LEN] = '\0'; \ - mtx_init(&(lock)->mutex, (lock)->name, MTX_NETWORK_LOCK, MTX_DEF); \ + mtx_init(&(lock)->mutex, (lock)->name, NULL, MTX_DEF); \ } #define LOCK_DESTROY(lock) \ if (mtx_initialized(&(lock)->mutex))\ |