K 10 svn:author V 6 adrian K 8 svn:date V 27 2011-09-11T16:52:07.133092Z K 7 svn:log V 1768 Revamp how interrupts and handled and scheduled, bringing this driver in line with what the reference driver and linux ath9k does. Currently, ath_intr() would submit certain things to occur via taskqueue_enqueue(). In the case of handling TX interrupts, it's quite possible that a TX completion interrupt (EOL, OK, mitigated, etc) could occur whilst the TX completion task was running. This meant that a small race could occur where the TX completion call to txqactive() (which would call into the HAL to see whether the current TXQ had some active interrupt event to service, and then clear that flag) could race with ath_intr() and the call to ah_getPendingInterrupts(), which for ar5212/ar5416 will set the TXQ active bits based on the contents of the relevant interrupt registers. This also means that ath_intr() won't occur during one of the TX, RX or reset-during-fatal situations. The only current exception to this are fatal events or SWBA, which still is enabled. It didn't completely close up the initial TXQ hang issue I saw earlier, but it along with the previous missing TXEOL change from earlier did eliminate some of the TXQ hangs. I'm going to be porting more code over from the reference driver and ath9k, so having the interrupt handling model here match those will make it easier. Finally, the ath_start() calls have been moved from various places in the receive/tx-complete path and into the deferred interrupt handler. Finally finally - I've disabled the optimised queue proc handling (q0 and q0123) versions of ath_tx_proc(), this needs to be reintroduced before this is merged into HEAD. Finally finally finally - I need to reschedule a read event after SWBA (which still occurs in interrupt context) to kick along fast-frames handling. END