Skip to content

Commit 78b2175

Browse files
derennbd168
authored andcommitted
mt76: mt7921s: fix bus hang with wrong privilege
Accroding to chip hw flow, mt7921s need to re-acquire privilege again before normal running. Otherwise, the bus may be stuck in an abnormal status. Tested-by: Leon Yen <[email protected]> Co-developed-by: Eric-SY Chang <[email protected]> Signed-off-by: Eric-SY Chang <[email protected]> Co-developed-by: YN Chen <[email protected]> Signed-off-by: YN Chen <[email protected]> Signed-off-by: Deren Wu <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
1 parent 00ff523 commit 78b2175

File tree

1 file changed

+11
-0
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7921

1 file changed

+11
-0
lines changed

drivers/net/wireless/mediatek/mt76/mt7921/mcu.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,17 @@ static int mt7921_load_patch(struct mt7921_dev *dev)
720720
if (ret)
721721
dev_err(dev->mt76.dev, "Failed to start patch\n");
722722

723+
if (mt76_is_sdio(&dev->mt76)) {
724+
/* activate again */
725+
ret = __mt7921_mcu_fw_pmctrl(dev);
726+
if (ret)
727+
return ret;
728+
729+
ret = __mt7921_mcu_drv_pmctrl(dev);
730+
if (ret)
731+
return ret;
732+
}
733+
723734
out:
724735
sem = mt76_connac_mcu_patch_sem_ctrl(&dev->mt76, false);
725736
switch (sem) {

0 commit comments

Comments
 (0)