mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7925: stop init retries on hung bus
Stop retrying hardware init once the bus is marked hung. The control path is no longer usable at that point, so more retries only issue failing device accesses, including MCU commands or register operations, and delay teardown. Exit early and let the failed device be torn down quickly. Signed-off-by: Sean Wang <[email protected]> Link: https://patch.msgid.link/[email protected]
This commit is contained in:
@@ -137,10 +137,18 @@ static int mt7925_init_hardware(struct mt792x_dev *dev)
|
||||
set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state);
|
||||
|
||||
for (i = 0; i < MT792x_MCU_INIT_RETRY_COUNT; i++) {
|
||||
if (atomic_read(&dev->mt76.bus_hung)) {
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
ret = __mt7925_init_hardware(dev);
|
||||
if (!ret)
|
||||
break;
|
||||
|
||||
if (atomic_read(&dev->mt76.bus_hung))
|
||||
break;
|
||||
|
||||
mt792x_init_reset(dev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user