[PATCH] mt76: mt7921s: fix possible sdio deadlock in command fail
Lorenzo Bianconi
lorenzo at kernel.org
Mon Jun 13 02:31:59 PDT 2022
> From: Deren Wu <deren.wu at mediatek.com>
>
> Move sdio_release_host() to final resource handing
>
Acked-by: Lorenzo Bianconi <lorenzo at kernel.org>
> Fixes: b12deb5e86fa ("mt76: mt7921s: fix mt7921s_mcu_[fw|drv]_pmctrl")
> Reported-by: YN Chen <YN.Chen at mediatek.com>
> Signed-off-by: Deren Wu <deren.wu at mediatek.com>
> ---
> drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c
> index 54a5c712a3c3..1856d677fff4 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c
> @@ -156,9 +156,9 @@ int mt7921s_mcu_fw_pmctrl(struct mt7921_dev *dev)
>
> err = readx_poll_timeout(mt76s_read_pcr, &dev->mt76, status,
> !(status & WHLPCR_IS_DRIVER_OWN), 2000, 1000000);
> +err:
> sdio_release_host(func);
>
> -err:
> if (err < 0) {
> dev_err(dev->mt76.dev, "firmware own failed\n");
> clear_bit(MT76_STATE_PM, &mphy->state);
> --
> 2.18.0
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20220613/092fe5ad/attachment.sig>
More information about the Linux-mediatek
mailing list