Date: Wed, 5 Aug 2015 21:22:25 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286343 - head/sys/dev/ath Message-ID: <201508052122.t75LMPWa045421@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Wed Aug 5 21:22:25 2015 New Revision: 286343 URL: https://svnweb.freebsd.org/changeset/base/286343 Log: 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 .. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Wed Aug 5 21:16:12 2015 (r286342) +++ head/sys/dev/ath/if_ath.c Wed Aug 5 21:22:25 2015 (r286343) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508052122.t75LMPWa045421>