diff mbox series

mt76: mt7921: apply the previous MCU timeout

Message ID b0dfe8afc5cf88ab9a6d54c88fba4a29631c125a.1659571732.git.objelf@gmail.com (mailing list archive)
State New, archived
Headers show
Series mt76: mt7921: apply the previous MCU timeout | expand

Commit Message

Sean Wang Aug. 4, 2022, 12:26 a.m. UTC
From: Sean Wang <sean.wang@mediatek.com>

Apply back the previous MCU timeout that can trigger the chip reset to
recover the fatal error in time.

Fixes: 8fcd1fb7cbd5 ("mt76: move mt76_connac2_mcu_fill_message in mt76_connac module")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Kalle Valo Aug. 4, 2022, 6:07 a.m. UTC | #1
<sean.wang@mediatek.com> writes:

> From: Sean Wang <sean.wang@mediatek.com>
>
> Apply back the previous MCU timeout that can trigger the chip reset to
> recover the fatal error in time.
>
> Fixes: 8fcd1fb7cbd5 ("mt76: move mt76_connac2_mcu_fill_message in
>  mt76_connac module")

Fixes tag in one line, please.
Lorenzo Bianconi Aug. 4, 2022, 8:16 a.m. UTC | #2
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Apply back the previous MCU timeout that can trigger the chip reset to
> recover the fatal error in time.
> 
> Fixes: 8fcd1fb7cbd5 ("mt76: move mt76_connac2_mcu_fill_message in
>  mt76_connac module")
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>  drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
>  b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> index 0afcadce87fc..da8223c515eb 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> @@ -3050,7 +3050,10 @@ int mt76_connac2_mcu_fill_message(struct mt76_dev
>  *dev, struct sk_buff *skb,
>  	u8 seq;
>  
>  	/* TODO: make dynamic based on msg type */
> -	dev->mcu.timeout = 20 * HZ;
> +	if (is_mt7921(dev))
> +		dev->mcu.timeout = 3 * HZ;
> +	else
> +		dev->mcu.timeout = 20 * HZ;

Hi Sean,

I did not get the fix here since we are setting dev->mcu.timeout in
mt76_connac2_mcu_fill_message caller (e.g. mt7921s_mcu_send_message).
Am I missing something?

Regards,
Lorenzo

>  
>  	seq = ++dev->mcu.msg_seq & 0xf;
>  	if (!seq)
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
index 0afcadce87fc..da8223c515eb 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
@@ -3050,7 +3050,10 @@  int mt76_connac2_mcu_fill_message(struct mt76_dev *dev, struct sk_buff *skb,
 	u8 seq;
 
 	/* TODO: make dynamic based on msg type */
-	dev->mcu.timeout = 20 * HZ;
+	if (is_mt7921(dev))
+		dev->mcu.timeout = 3 * HZ;
+	else
+		dev->mcu.timeout = 20 * HZ;
 
 	seq = ++dev->mcu.msg_seq & 0xf;
 	if (!seq)