wifi: mt76: mt7925: skip reset work on hung bus

Skip mt7925 reset handling once the bus is marked hung.

A hung bus cannot be recovered by issuing another device reset. Continuing
the reset path may only send more failing MCU or register accesses and
delay teardown. Return early from reset work and the USB reset path so the
failed device can be torn down quickly.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20260613224131.2396026-3-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Sean Wang 2026-06-13 17:41:27 -05:00 committed by Felix Fietkau
parent 7e87dc3b21
commit c781b74c3f
2 changed files with 13 additions and 0 deletions

View File

@ -1516,6 +1516,9 @@ void mt7925_mac_reset_work(struct work_struct *work)
struct mt76_connac_pm *pm = &dev->pm;
int i, ret;
if (atomic_read(&dev->mt76.bus_hung))
return;
dev_dbg(dev->mt76.dev, "chip reset\n");
dev->hw_full_reset = true;
ieee80211_stop_queues(hw);
@ -1533,6 +1536,9 @@ void mt7925_mac_reset_work(struct work_struct *work)
break;
}
if (atomic_read(&dev->mt76.bus_hung))
return;
if (i == 10)
dev_err(dev->mt76.dev, "chip reset failed\n");

View File

@ -81,6 +81,13 @@ static int mt7925u_mac_reset(struct mt792x_dev *dev)
{
int err;
if (atomic_read(&dev->mt76.bus_hung))
return 0;
mt792xu_reset_on_bus_error(dev);
if (atomic_read(&dev->mt76.bus_hung))
return 0;
mt76_txq_schedule_all(&dev->mphy);
mt76_worker_disable(&dev->mt76.tx_worker);