• Felix Fietkau's avatar
    ath9k_hw: improve reset reliability after errors · a9382b77
    Felix Fietkau authored
    commit 3412f2f0 upstream.
    
    On many different chips, important aspects of the MAC state are not
    fully cleared by a warm reset. This can show up as tx/rx hangs, those
    annoying "DMA failed to stop in 10 ms..." messages or other quirks.
    
    On AR933x, the chip can occasionally get stuck in a way that only a
    driver unload/reload or a reboot would bring it back to life.
    
    With this patch, a full reset is issued when bringing the chip out of
    FULL-SLEEP state (after idle), or if either Rx or Tx was not shut down
    properly. This makes the DMA related error messages disappear completely
    in my tests on AR933x, and the chip does not get stuck anymore.
    Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    a9382b77
hw.c 82.4 KB