Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: sean.wang@mediatek.com
Cc: nbd@nbd.name, lorenzo.bianconi@redhat.com,
	Soul.Huang@mediatek.com, YN.Chen@mediatek.com,
	Leon.Yen@mediatek.com, Eric-SY.Chang@mediatek.com,
	Deren.Wu@mediatek.com, km.lin@mediatek.com,
	jenhao.yang@mediatek.com, robin.chiu@mediatek.com,
	Eddie.Chen@mediatek.com, ch.yeh@mediatek.com,
	posh.sun@mediatek.com, ted.huang@mediatek.com,
	Stella.Chang@mediatek.com, Tom.Chou@mediatek.com,
	steve.lee@mediatek.com, jsiuda@google.com, frankgor@google.com,
	kuabhs@google.com, druth@google.com, abhishekpandit@google.com,
	shawnku@google.com, linux-wireless@vger.kernel.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] mt76: mt7921: get rid of the false positive reset
Date: Tue, 16 Aug 2022 10:00:31 +0200	[thread overview]
Message-ID: <YvtOnx1/jXtKy86Q@lore-desk> (raw)
In-Reply-To: <95b03bb77ce93cb2cade98d947309cd669721939.1660519674.git.objelf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2952 bytes --]

> From: Sean Wang <sean.wang@mediatek.com>
> 
> False positive reset would be possibly triggered by those commands we
> applied in suspend with HZ MCU timeout, especially it happened when we
> enabled kernel log in pm core to diagnose how much time we spend in each
> driver during suspend procedure. So we enlarge the value and align the MCU
> timeout as other commands we did to reduce the false positive reset.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

> ---
>  drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c  | 7 +------
>  drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c | 7 +------
>  drivers/net/wireless/mediatek/mt76/mt7921/usb.c      | 7 +------
>  3 files changed, 3 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c
> index 5efda694fb9d..64568536c1e9 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c
> @@ -30,12 +30,7 @@ mt7921_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
>  	if (ret)
>  		return ret;
>  
> -	if (cmd == MCU_UNI_CMD(HIF_CTRL) ||
> -	    cmd == MCU_UNI_CMD(SUSPEND) ||
> -	    cmd == MCU_UNI_CMD(OFFLOAD))
> -		mdev->mcu.timeout = HZ;
> -	else
> -		mdev->mcu.timeout = 3 * HZ;
> +	mdev->mcu.timeout = 3 * HZ;
>  
>  	if (cmd == MCU_CMD(FW_SCATTER))
>  		txq = MT_MCUQ_FWDL;
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c
> index e038d7404323..5c1489766d9f 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c
> @@ -33,12 +33,7 @@ mt7921s_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
>  	if (ret)
>  		return ret;
>  
> -	if (cmd == MCU_UNI_CMD(HIF_CTRL) ||
> -	    cmd == MCU_UNI_CMD(SUSPEND) ||
> -	    cmd == MCU_UNI_CMD(OFFLOAD))
> -		mdev->mcu.timeout = HZ;
> -	else
> -		mdev->mcu.timeout = 3 * HZ;
> +	mdev->mcu.timeout = 3 * HZ;
>  
>  	if (cmd == MCU_CMD(FW_SCATTER))
>  		type = MT7921_SDIO_FWDL;
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
> index dd3b8884e162..d06cee386acd 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
> @@ -106,12 +106,7 @@ mt7921u_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
>  	if (ret)
>  		return ret;
>  
> -	if (cmd == MCU_UNI_CMD(HIF_CTRL) ||
> -	    cmd == MCU_UNI_CMD(SUSPEND) ||
> -	    cmd == MCU_UNI_CMD(OFFLOAD))
> -		mdev->mcu.timeout = HZ;
> -	else
> -		mdev->mcu.timeout = 3 * HZ;
> +	mdev->mcu.timeout = 3 * HZ;
>  
>  	if (cmd != MCU_CMD(FW_SCATTER))
>  		ep = MT_EP_OUT_INBAND_CMD;
> -- 
> 2.25.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2022-08-16  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-14 23:37 [PATCH] mt76: mt7921: get rid of the false positive reset sean.wang
2022-08-16  8:00 ` Lorenzo Bianconi [this message]
2022-08-31 11:40 ` Kalle Valo

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=YvtOnx1/jXtKy86Q@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=Deren.Wu@mediatek.com \
    --cc=Eddie.Chen@mediatek.com \
    --cc=Eric-SY.Chang@mediatek.com \
    --cc=Leon.Yen@mediatek.com \
    --cc=Soul.Huang@mediatek.com \
    --cc=Stella.Chang@mediatek.com \
    --cc=Tom.Chou@mediatek.com \
    --cc=YN.Chen@mediatek.com \
    --cc=abhishekpandit@google.com \
    --cc=ch.yeh@mediatek.com \
    --cc=druth@google.com \
    --cc=frankgor@google.com \
    --cc=jenhao.yang@mediatek.com \
    --cc=jsiuda@google.com \
    --cc=km.lin@mediatek.com \
    --cc=kuabhs@google.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=posh.sun@mediatek.com \
    --cc=robin.chiu@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shawnku@google.com \
    --cc=steve.lee@mediatek.com \
    --cc=ted.huang@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