From: Deren Wu <deren.wu@mediatek.com>
To: Aaron Ma <aaron.ma@canonical.com>, <nbd@nbd.name>,
<lorenzo.bianconi83@gmail.com>, <ryder.lee@mediatek.com>,
<kvalo@codeaurora.org>, <davem@davemloft.net>, <kuba@kernel.org>,
<matthias.bgg@gmail.com>, <sean.wang@mediatek.com>,
<Soul.Huang@mediatek.com>, <linux-wireless@vger.kernel.org>,
<netdev@vger.kernel.org>, <linux-mediatek@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] mt76: mt7921: continue to probe driver when fw already downloaded
Date: Thu, 8 Jul 2021 23:08:30 +0800 [thread overview]
Message-ID: <1eaab818ef2478b115e1387dcca7427f633cc217.camel@mediatek.com> (raw)
In-Reply-To: <20210708131710.695595-1-aaron.ma@canonical.com>
Hi Aaron,
Thanks for this patch. We verified this is good here.
Could you please add fix tag as well? It's better to backport this
patch.
Fixes: 1c099ab44727c ("mt76: mt7921: add MCU support")
Thanks,
Deren
On Thu, 2021-07-08 at 21:17 +0800, Aaron Ma wrote:
> 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: Aaron Ma <aaron.ma@canonical.com>
> ---
> drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> index c2c4dc196802..cd690c64f65b 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
> @@ -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);
> if (ret) {
> dev_dbg(dev->mt76.dev, "Firmware is already
> download\n");
> - return -EIO;
> + goto fw_loaded;
> }
>
> ret = mt7921_load_patch(dev);
> @@ -949,6 +949,7 @@ static int mt7921_load_firmware(struct mt7921_dev
> *dev)
> return -EIO;
> }
>
> +fw_loaded:
> mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_FWDL],
> false);
>
> #ifdef CONFIG_PM
next prev parent reply other threads:[~2021-07-08 15:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 13:17 Aaron Ma
2021-07-08 15:08 ` Deren Wu [this message]
2021-07-08 20:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1eaab818ef2478b115e1387dcca7427f633cc217.camel@mediatek.com \
--to=deren.wu@mediatek.com \
--cc=Soul.Huang@mediatek.com \
--cc=aaron.ma@canonical.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®