lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1eaab818ef2478b115e1387dcca7427f633cc217.camel@mediatek.com>
Date:   Thu, 8 Jul 2021 23:08:30 +0800
From:   Deren Wu <deren.wu@...iatek.com>
To:     Aaron Ma <aaron.ma@...onical.com>, <nbd@....name>,
        <lorenzo.bianconi83@...il.com>, <ryder.lee@...iatek.com>,
        <kvalo@...eaurora.org>, <davem@...emloft.net>, <kuba@...nel.org>,
        <matthias.bgg@...il.com>, <sean.wang@...iatek.com>,
        <Soul.Huang@...iatek.com>, <linux-wireless@...r.kernel.org>,
        <netdev@...r.kernel.org>, <linux-mediatek@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] mt76: mt7921: continue to probe driver when fw already
 downloaded

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@...onical.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ