Commit a37a9910 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

ath9k_hw: fix host interface reset on AR934x

If a local bus timeout has been detected, the host interface needs to be
reset to clear the errors. AR934x uses a different synchronous interrupt
bit to indicate this, so the check needs to be fixed.
Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 23dd9b2a
...@@ -1306,9 +1306,13 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type) ...@@ -1306,9 +1306,13 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type)
AR_RTC_RC_COLD_RESET | AR_RTC_RC_WARM_RESET; AR_RTC_RC_COLD_RESET | AR_RTC_RC_WARM_RESET;
} else { } else {
tmpReg = REG_READ(ah, AR_INTR_SYNC_CAUSE); tmpReg = REG_READ(ah, AR_INTR_SYNC_CAUSE);
if (tmpReg & if (AR_SREV_9340(ah))
(AR_INTR_SYNC_LOCAL_TIMEOUT | tmpReg &= AR9340_INTR_SYNC_LOCAL_TIMEOUT;
AR_INTR_SYNC_RADM_CPL_TIMEOUT)) { else
tmpReg &= AR_INTR_SYNC_LOCAL_TIMEOUT |
AR_INTR_SYNC_RADM_CPL_TIMEOUT;
if (tmpReg) {
u32 val; u32 val;
REG_WRITE(ah, AR_INTR_SYNC_ENABLE, 0); REG_WRITE(ah, AR_INTR_SYNC_ENABLE, 0);
......
...@@ -1007,6 +1007,8 @@ enum { ...@@ -1007,6 +1007,8 @@ enum {
AR_INTR_SYNC_LOCAL_TIMEOUT | AR_INTR_SYNC_LOCAL_TIMEOUT |
AR_INTR_SYNC_MAC_SLEEP_ACCESS), AR_INTR_SYNC_MAC_SLEEP_ACCESS),
AR9340_INTR_SYNC_LOCAL_TIMEOUT = 0x00000010,
AR_INTR_SYNC_SPURIOUS = 0xFFFFFFFF, AR_INTR_SYNC_SPURIOUS = 0xFFFFFFFF,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment