From 158529d679111810eae02f7ed371fbec810ab394 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 20 Jan 2019 15:13:43 +0100 Subject: [PATCH] mt7603: fix PSE reset retry sequence Clear pending PSE request bit in order to avoid having it trigger by the firmware at a bad point in time. Only clear AC queue stuck bits if the PSE reset succeeded Signed-off-by: Felix Fietkau --- mt7603/mac.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mt7603/mac.c b/mt7603/mac.c index b6a86fd0..4b836d7b 100644 --- a/mt7603/mac.c +++ b/mt7603/mac.c @@ -1204,16 +1204,14 @@ static void mt7603_pse_reset(struct mt7603_dev *dev) MT_MCU_DEBUG_RESET_PSE_S, MT_MCU_DEBUG_RESET_PSE_S, 500)) { dev->reset_cause[RESET_CAUSE_RESET_FAILED]++; + mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_PSE); } else { dev->reset_cause[RESET_CAUSE_RESET_FAILED] = 0; + mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_QUEUES); } - mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_QUEUES); - - if (dev->reset_cause[RESET_CAUSE_RESET_FAILED] >= 3) { + if (dev->reset_cause[RESET_CAUSE_RESET_FAILED] >= 3) dev->reset_cause[RESET_CAUSE_RESET_FAILED] = 0; - mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_PSE); - } } void mt7603_mac_dma_start(struct mt7603_dev *dev)