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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to