mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt7603: report PSE reset failures via debugfs
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -28,6 +28,7 @@ mt7603_reset_read(struct seq_file *s, void *data)
|
||||
[RESET_CAUSE_RX_PSE_BUSY] = "RX PSE busy stuck",
|
||||
[RESET_CAUSE_BEACON_STUCK] = "Beacon stuck",
|
||||
[RESET_CAUSE_MCU_HANG] = "MCU hang",
|
||||
[RESET_CAUSE_RESET_FAILED] = "PSE reset failed",
|
||||
};
|
||||
int i;
|
||||
|
||||
|
||||
+4
-4
@@ -1202,9 +1202,9 @@ static void mt7603_pse_reset(struct mt7603_dev *dev)
|
||||
MT_MCU_DEBUG_RESET_PSE_S,
|
||||
MT_MCU_DEBUG_RESET_PSE_S, 500)) {
|
||||
mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_PSE);
|
||||
dev->pse_reset_failed++;
|
||||
dev->reset_cause[RESET_CAUSE_RESET_FAILED]++;
|
||||
} else {
|
||||
dev->pse_reset_failed = 0;
|
||||
dev->reset_cause[RESET_CAUSE_RESET_FAILED] = 0;
|
||||
}
|
||||
|
||||
mt76_clear(dev, MT_MCU_DEBUG_RESET, MT_MCU_DEBUG_RESET_QUEUES);
|
||||
@@ -1260,7 +1260,7 @@ static void mt7603_mac_watchdog_reset(struct mt7603_dev *dev)
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
|
||||
mt7603_pse_reset(dev);
|
||||
if (dev->pse_reset_failed)
|
||||
if (dev->reset_cause[RESET_CAUSE_RESET_FAILED])
|
||||
goto skip_dma_reset;
|
||||
|
||||
mt7603_mac_stop(dev);
|
||||
@@ -1456,7 +1456,7 @@ void mt7603_mac_work(struct work_struct *work)
|
||||
mt7603_watchdog_check(dev, &dev->mcu_hang,
|
||||
RESET_CAUSE_MCU_HANG,
|
||||
NULL) ||
|
||||
dev->pse_reset_failed) {
|
||||
dev->reset_cause[RESET_CAUSE_RESET_FAILED]) {
|
||||
dev->beacon_check = 0;
|
||||
dev->tx_dma_check = 0;
|
||||
dev->tx_hang_check = 0;
|
||||
|
||||
+1
-1
@@ -94,6 +94,7 @@ enum mt7603_reset_cause {
|
||||
RESET_CAUSE_BEACON_STUCK,
|
||||
RESET_CAUSE_RX_PSE_BUSY,
|
||||
RESET_CAUSE_MCU_HANG,
|
||||
RESET_CAUSE_RESET_FAILED,
|
||||
__RESET_CAUSE_MAX
|
||||
};
|
||||
|
||||
@@ -133,7 +134,6 @@ struct mt7603_dev {
|
||||
u8 rx_dma_check;
|
||||
u8 rx_pse_check;
|
||||
u8 mcu_hang;
|
||||
u8 pse_reset_failed;
|
||||
|
||||
u16 tx_dma_idx[4];
|
||||
u16 rx_dma_idx;
|
||||
|
||||
Reference in New Issue
Block a user