From d87e4b025286eedc8acffd1af37da695713a9279 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 19 May 2018 11:19:11 +0200 Subject: [PATCH] mt7603: clear PSE reset bit if PSE reset fails If the firmware is blocked, it should not continue to attempt a reset until it is safe to do so Signed-off-by: Felix Fietkau --- mt7603_mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mt7603_mac.c b/mt7603_mac.c index aef26c24..7c5de273 100644 --- a/mt7603_mac.c +++ b/mt7603_mac.c @@ -1181,9 +1181,10 @@ static void mt7603_pse_reset(struct mt7603_dev *dev) if (!mt76_poll_msec(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_PSE_S, - MT_MCU_DEBUG_RESET_PSE_S, 500)) + MT_MCU_DEBUG_RESET_PSE_S, 500)) { + mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_PSE); dev->pse_reset_failed++; - else + } else dev->pse_reset_failed = 0; mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_QUEUES);