* [PATCH] mt76: mt7921s: fix bus hang with wrong privilege
@ 2021-11-28 7:43 Deren Wu
0 siblings, 0 replies; only message in thread
From: Deren Wu @ 2021-11-28 7:43 UTC (permalink / raw)
To: Felix Fietkau, Lorenzo Bianconi
Cc: Sean Wang, Soul Huang, YN Chen, Leon Yen, Eric-SY Chang,
Deren Wu, KM Lin, Robin Chiu, CH Yeh, Posh Sun, Eric Liang,
Stella Chang, Evelyn Tsai, Ryder Lee, Shayne Chen,
linux-wireless, linux-mediatek, Deren Wu
From: Deren Wu <deren.wu@mediatek.com>
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 <Leon.Yen@mediatek.com>
Co-developed-by: Eric-SY Chang <Eric-SY.Chang@mediatek.com>
Signed-off-by: Eric-SY Chang <Eric-SY.Chang@mediatek.com>
Co-developed-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
index 6ada1ebe7d68..1227d626e9d3 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
@@ -720,6 +720,17 @@ static int mt7921_load_patch(struct mt7921_dev *dev)
if (ret)
dev_err(dev->mt76.dev, "Failed to start patch\n");
+ if (mt76_is_sdio(&dev->mt76)) {
+ /* activate again */
+ ret = __mt7921_mcu_fw_pmctrl(dev);
+ if (ret)
+ return ret;
+
+ ret = __mt7921_mcu_drv_pmctrl(dev);
+ if (ret)
+ return ret;
+ }
+
out:
sem = mt76_connac_mcu_patch_sem_ctrl(&dev->mt76, false);
switch (sem) {
--
2.18.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-28 7:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-28 7:43 [PATCH] mt76: mt7921s: fix bus hang with wrong privilege Deren Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).