mirror of
https://github.com/torvalds/linux.git
synced 2026-10-08 11:36:02 +02: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 <sean.wang@mediatek.com> Link: https://patch.msgid.link/20260613224131.2396026-2-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
70869cc429
commit
7e87dc3b21
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user