From 70c81b207714430bcc047ad31ddbfc38fe252793 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Wed, 5 Aug 2015 21:22:25 +0000 Subject: [PATCH] Add a hack-around to this fatal taskqueue running whilst the NIC is detaching. This mostly fixes a panic - the reset path shouldn't run whilst the NIC is being torn down. It's not locked, so it's "mostly" ok, but most of the rest of the driver doesn't read sc->invalid with sensible locking. Grr. The real solution is to cleanly tear down taskqueues in the detach/suspend phase, but .. --- sys/dev/ath/if_ath.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 4aac93bb0f5b..2c935a2b857d 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -2318,6 +2318,9 @@ ath_fatal_proc(void *arg, int pending) u_int32_t len; void *sp; + if (sc->sc_invalid) + return; + device_printf(sc->sc_dev, "hardware error; resetting\n"); /* * Fatal errors are unrecoverable. Typically these