mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 19:16:02 +02:00
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:
parent
7e87dc3b21
commit
c781b74c3f
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user