Skip to contentSkip to conversation

mt76: mt7921: fix the inconsistent state between bind and unbind

PATCH In review [email protected] 2 participants 2 messages Aug 23, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author reviewer
#0 lore raw

PATCH 1/1 mt76: mt7921: fix the inconsistent state between bind and unbind

From: Sean Wang <[email protected]>

We shouldn't put back the device into fw own state after wifi reset at driver unbind stage to fix the following error because that is not the consistent state the current driver bind stage expects.

localhost ~ # echo 0000:01:00.0 > /sys/bus/pci/drivers/mt7921e/unbind localhost ~ # echo 0000:01:00.0 > /sys/bus/pci/drivers/mt7921e/bind
...

[  481.172969] mt7921e 0000:01:00.0: ASIC revision: feed0000
[  482.133547] mt7921e: probe of 0000:01:00.0 failed with error -110

-bash: echo: write error: No such device

Fixes c1af184ba830 ("mt76: mt7921: fix dma hang in rmmod")
---
 drivers/net/wireless/mediatek/mt76/mt7921/init.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7921/init.c +0 -1
index 1f37e64b6038..3e84ef8f5358 100644
@@ -279,7 +279,6 @@ void mt7921_unregister_device(struct mt7921_dev *dev)
 	mt7921_mcu_drv_pmctrl(dev);
 	mt7921_dma_cleanup(dev);
 	mt7921_mcu_exit(dev);
-	mt7921_mcu_fw_pmctrl(dev);
 
 	tasklet_disable(&dev->irq_tasklet);
 	mt76_free_device(&dev->mt76);
Signature · 1 line
2.25.1
Tested-by on v1 1/1
#1 lore raw
Quoted 10 lines · On Mon, Aug 23, 2021 at 10:27 AM <[email protected]> wrote:

From: Sean Wang <[email protected]>

We shouldn't put back the device into fw own state after wifi reset at driver unbind stage to fix the following error because that is not the consistent state the current driver bind stage expects.

localhost ~ # echo 0000:01:00.0 > /sys/bus/pci/drivers/mt7921e/unbind localhost ~ # echo 0000:01:00.0 > /sys/bus/pci/drivers/mt7921e/bind
...

Quoted 8 lines
[  481.172969] mt7921e 0000:01:00.0: ASIC revision: feed0000
[  482.133547] mt7921e: probe of 0000:01:00.0 failed with error -110

-bash: echo: write error: No such device

Fixes c1af184ba830 ("mt76: mt7921: fix dma hang in rmmod")

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek