|
|
06c887 |
From d866e32d4b1449883bdf16d27a88173e7e3eff08 Mon Sep 17 00:00:00 2001
|
|
|
06c887 |
From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= <ihuguet@redhat.com>
|
|
|
06c887 |
Date: Tue, 21 Dec 2021 14:23:33 +0100
|
|
|
06c887 |
Subject: [PATCH] mt76: mt7921: continue to probe driver when fw already
|
|
|
06c887 |
downloaded
|
|
|
06c887 |
MIME-Version: 1.0
|
|
|
06c887 |
Content-Type: text/plain; charset=UTF-8
|
|
|
06c887 |
Content-Transfer-Encoding: 8bit
|
|
|
06c887 |
|
|
|
06c887 |
Bugzilla: http://bugzilla.redhat.com/2041422
|
|
|
06c887 |
|
|
|
06c887 |
commit c34269041185dad1bab7a34f42ef9fab967a1684
|
|
|
06c887 |
Author: Aaron Ma <aaron.ma@canonical.com>
|
|
|
06c887 |
Date: Thu Jul 8 21:17:10 2021 +0800
|
|
|
06c887 |
|
|
|
06c887 |
mt76: mt7921: continue to probe driver when fw already downloaded
|
|
|
06c887 |
|
|
|
06c887 |
When reboot system, no power cycles, firmware is already downloaded,
|
|
|
06c887 |
return -EIO will break driver as error:
|
|
|
06c887 |
mt7921e: probe of 0000:03:00.0 failed with error -5
|
|
|
06c887 |
|
|
|
06c887 |
Skip firmware download and continue to probe.
|
|
|
06c887 |
|
|
|
06c887 |
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
|
|
|
06c887 |
Fixes: 1c099ab44727c ("mt76: mt7921: add MCU support")
|
|
|
06c887 |
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
|
06c887 |
|
|
|
06c887 |
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
|
|
|
06c887 |
---
|
|
|
06c887 |
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
|
|
|
06c887 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
06c887 |
|
|
|
06c887 |
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
|
|
|
06c887 |
index 5f3d56d570a5..3fdb4c0895c9 100644
|
|
|
06c887 |
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
|
|
|
06c887 |
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
|
|
|
06c887 |
@@ -907,7 +907,7 @@ static int mt7921_load_firmware(struct mt7921_dev *dev)
|
|
|
06c887 |
ret = mt76_get_field(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY);
|
|
|
06c887 |
if (ret) {
|
|
|
06c887 |
dev_dbg(dev->mt76.dev, "Firmware is already download\n");
|
|
|
06c887 |
- return -EIO;
|
|
|
06c887 |
+ goto fw_loaded;
|
|
|
06c887 |
}
|
|
|
06c887 |
|
|
|
06c887 |
ret = mt7921_load_patch(dev);
|
|
|
06c887 |
@@ -925,6 +925,7 @@ static int mt7921_load_firmware(struct mt7921_dev *dev)
|
|
|
06c887 |
return -EIO;
|
|
|
06c887 |
}
|
|
|
06c887 |
|
|
|
06c887 |
+fw_loaded:
|
|
|
06c887 |
mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_FWDL], false);
|
|
|
06c887 |
|
|
|
06c887 |
#ifdef CONFIG_PM
|
|
|
06c887 |
--
|
|
|
06c887 |
2.13.6
|
|
|
06c887 |
|