freebsd-skq/sys/dev/ath
adrian bf0a7194e7 Attempt to further fix some of the concurrency/reset issues that occur.
* ath_reset() is being called in softclock context, which may have the
  thing sleep on a lock.  To avoid this, since we really _shouldn't_
  be sleeping on any locks, break out the no-loss reset path into a tasklet
  and call that from:

  + ath_calibrate()
  + ath_watchdog()

  This has the added advantage that it'll end up also doing the frame
  RX cleanup from within the taskqueue context, rather than the softclock
  context.

* Shuffle around the taskqueue_block() call to be before we grab the lock
  and disable interrupts.

  The trouble here is that taskqueue_block() doesn't block currently
  queued (but not yet running) tasks so calling it doesn't guarantee
  no further tasks (that weren't running on _A_ CPU at the time of this
  call) will complete.  Calling taskqueue_drain() on these tasks won't
  work because if any _other_ thread calls taskqueue_enqueue() for whatever
  reason, everything gets very angry and stops working.

  This slightly changes the race condition enough to let ath_rx_tasklet()
  run before we try disabling it, and thus quietens the warnings a bit.

  The (more) true solution will be doing something like the following:

  * having a taskqueue_blocked mask in ath_softc;
  * having an interrupt_blocked mask in ath_softc;
  * only calling taskqueue_drain() on each individual task _after_ the
    lock has been acquired - that way no further tasklet scheduling
    is going to occur.
  * Then once the tasks have been blocked _and_ the interrupt has been
    disabled, call taskqueue_drain() on each, ensuring that anything
    that _was_ scheduled or running is removed.

  The trouble is if something calls taskqueue_enqueue() on a task
  after taskqueue_blocked() has been called but BEFORE taskqueue_drain()
  has been called, ta_pending will be set to 1 and taskqueue_drain()
  will sit there stuck in msleep() until you hard-kill the machine.

PR: kern/165382
PR: kern/165220
2012-02-25 19:12:54 +00:00
..
ath_dfs/null Contribute some example code which demonstrates how to initialise the 2012-02-06 20:23:21 +00:00
ath_hal Break out the radar code into a separate source file. 2012-02-20 03:07:07 +00:00
ath_rate Fix the compile to work when IEEE80211_DEBUG isn't defined. 2011-11-09 04:08:01 +00:00
ah_osdep.c Introduce a work-around for issues with the AR5416 based MAC on SMP devices. 2011-11-09 22:39:44 +00:00
ah_osdep.h Fix AR5416 and later parts when building with AH_DEBUG or similar defined: 2009-07-06 20:51:54 +00:00
if_ath_ahb.c Begin merging in some of my 802.11n TX aggregation driver changes. 2011-11-08 02:12:11 +00:00
if_ath_debug.c Add support to the TX descriptor printing code to follow ath_buf 2011-11-08 22:01:03 +00:00
if_ath_debug.h Add some new ath(4) debugging bits, from my if_ath_tx 11n TX branch. 2011-10-29 07:17:47 +00:00
if_ath_keycache.c Add a 'vap' to ath_keyset(). 2011-11-08 19:25:52 +00:00
if_ath_keycache.h Add a 'vap' to ath_keyset(). 2011-11-08 19:25:52 +00:00
if_ath_led.c Since the only thing with a mux is the AR5416 and later, and we're now 2011-12-26 07:48:29 +00:00
if_ath_led.h Refactor out the software LED config code into a common function, called 2011-12-26 05:46:22 +00:00
if_ath_misc.h Introduce TX aggregation and software TX queue management 2011-11-08 22:43:13 +00:00
if_ath_pci.c Conditionally compile the PCI latency workaround; I think it's 2011-11-08 18:37:52 +00:00
if_ath_sysctl.c Flesh out configurable hardware based LED blinking. 2011-12-26 07:47:05 +00:00
if_ath_sysctl.h Break out most of the HAL related tweaks into a per-HAL instance, 2011-06-23 02:38:36 +00:00
if_ath_tx_ht.c Introduce TX aggregation and software TX queue management 2011-11-08 22:43:13 +00:00
if_ath_tx_ht.h Introduce TX aggregation and software TX queue management 2011-11-08 22:43:13 +00:00
if_ath_tx.c style(9) changes. This shouldn't change functionality. 2012-01-11 00:16:44 +00:00
if_ath_tx.h Introduce TX aggregation and software TX queue management 2011-11-08 22:43:13 +00:00
if_ath.c Attempt to further fix some of the concurrency/reset issues that occur. 2012-02-25 19:12:54 +00:00
if_athdfs.h Change the prototype so the radar enable can fail. 2012-01-28 21:44:42 +00:00
if_athioctl.h Flesh out the TX aggregation completion statistics. 2011-11-23 05:00:25 +00:00
if_athrate.h Introduce TX aggregation and software TX queue management 2011-11-08 22:43:13 +00:00
if_athvar.h Attempt to further fix some of the concurrency/reset issues that occur. 2012-02-25 19:12:54 +00:00