* [PATCH] mt76: mt7921: apply the previous MCU timeout
@ 2022-08-04 0:26 sean.wang
2022-08-04 6:07 ` Kalle Valo
2022-08-04 8:16 ` Lorenzo Bianconi
0 siblings, 2 replies; 4+ messages in thread
From: sean.wang @ 2022-08-04 0:26 UTC (permalink / raw)
To: nbd, lorenzo.bianconi
Cc: sean.wang, Soul.Huang, YN.Chen, Leon.Yen, Eric-SY.Chang, Deren.Wu,
km.lin, jenhao.yang, robin.chiu, Eddie.Chen, ch.yeh, posh.sun,
ted.huang, Stella.Chang, Tom.Chou, steve.lee, jsiuda, frankgor,
kuabhs, druth, abhishekpandit, shawnku, linux-wireless,
linux-mediatek
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;
seq = ++dev->mcu.msg_seq & 0xf;
if (!seq)
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: mt7921: apply the previous MCU timeout
2022-08-04 0:26 sean.wang
@ 2022-08-04 6:07 ` Kalle Valo
2022-08-04 8:16 ` Lorenzo Bianconi
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2022-08-04 6:07 UTC (permalink / raw)
To: sean.wang
Cc: nbd, lorenzo.bianconi, Soul.Huang, YN.Chen, Leon.Yen,
Eric-SY.Chang, Deren.Wu, km.lin, jenhao.yang, robin.chiu,
Eddie.Chen, ch.yeh, posh.sun, ted.huang, Stella.Chang, Tom.Chou,
steve.lee, jsiuda, frankgor, kuabhs, druth, abhishekpandit,
shawnku, linux-wireless, linux-mediatek
<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.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: mt7921: apply the previous MCU timeout
2022-08-04 0:26 sean.wang
2022-08-04 6:07 ` Kalle Valo
@ 2022-08-04 8:16 ` Lorenzo Bianconi
1 sibling, 0 replies; 4+ messages in thread
From: Lorenzo Bianconi @ 2022-08-04 8:16 UTC (permalink / raw)
To: sean.wang
Cc: nbd, lorenzo.bianconi, Soul.Huang, YN.Chen, Leon.Yen,
Eric-SY.Chang, Deren.Wu, km.lin, jenhao.yang, robin.chiu,
Eddie.Chen, ch.yeh, posh.sun, ted.huang, Stella.Chang, Tom.Chou,
steve.lee, jsiuda, frankgor, kuabhs, druth, abhishekpandit,
shawnku, linux-wireless, linux-mediatek
[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]
> 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
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mt76: mt7921: apply the previous MCU timeout
[not found] <YuuAX3aa/bmL5ZdM@localhost.localdomain--annotate>
@ 2022-08-04 13:09 ` sean.wang
0 siblings, 0 replies; 4+ messages in thread
From: sean.wang @ 2022-08-04 13:09 UTC (permalink / raw)
To: nbd, lorenzo
Cc: sean.wang, Soul.Huang, YN.Chen, Leon.Yen, Eric-SY.Chang, Deren.Wu,
km.lin, jenhao.yang, robin.chiu, Eddie.Chen, ch.yeh, posh.sun,
ted.huang, Stella.Chang, Tom.Chou, steve.lee, jsiuda, frankgor,
kuabhs, druth, abhishekpandit, shawnku, linux-wireless,
linux-mediatek
From: Sean Wang <sean.wang@mediatek.com>
>> 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?
oops! You're right. The patch should be dropped out. Thanks for the head-up.
Sean
>
>Regards,
>Lorenzo
>
>>
>> seq = ++dev->mcu.msg_seq & 0xf;
>> if (!seq)
>> --
>> 2.25.1
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-04 13:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <YuuAX3aa/bmL5ZdM@localhost.localdomain--annotate>
2022-08-04 13:09 ` [PATCH] mt76: mt7921: apply the previous MCU timeout sean.wang
2022-08-04 0:26 sean.wang
2022-08-04 6:07 ` Kalle Valo
2022-08-04 8:16 ` Lorenzo Bianconi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).