Commit c3426904 authored by Aaron Ma's avatar Aaron Ma Committed by David S. Miller

mt76: mt7921: continue to probe driver when fw already downloaded

When reboot system, no power cycles, firmware is already downloaded,
return -EIO will break driver as error:
mt7921e: probe of 0000:03:00.0 failed with error -5

Skip firmware download and continue to probe.
Signed-off-by: default avatarAaron Ma <aaron.ma@canonical.com>
Fixes: 1c099ab4 ("mt76: mt7921: add MCU support")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b9d233ea
...@@ -931,7 +931,7 @@ static int mt7921_load_firmware(struct mt7921_dev *dev) ...@@ -931,7 +931,7 @@ static int mt7921_load_firmware(struct mt7921_dev *dev)
ret = mt76_get_field(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY); ret = mt76_get_field(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY);
if (ret) { if (ret) {
dev_dbg(dev->mt76.dev, "Firmware is already download\n"); dev_dbg(dev->mt76.dev, "Firmware is already download\n");
return -EIO; goto fw_loaded;
} }
ret = mt7921_load_patch(dev); ret = mt7921_load_patch(dev);
...@@ -949,6 +949,7 @@ static int mt7921_load_firmware(struct mt7921_dev *dev) ...@@ -949,6 +949,7 @@ static int mt7921_load_firmware(struct mt7921_dev *dev)
return -EIO; return -EIO;
} }
fw_loaded:
mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_FWDL], false); mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_FWDL], false);
#ifdef CONFIG_PM #ifdef CONFIG_PM
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment