From patchwork Thu Aug 4 00:26:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Wang X-Patchwork-Id: 12935959 X-Patchwork-Delegate: nbd@nbd.name Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3969EC19F29 for ; Thu, 4 Aug 2022 00:26:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236977AbiHDA0s (ORCPT ); Wed, 3 Aug 2022 20:26:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229881AbiHDA0q (ORCPT ); Wed, 3 Aug 2022 20:26:46 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C057C2654A for ; Wed, 3 Aug 2022 17:26:39 -0700 (PDT) X-UUID: bbcfc82f14f54649a47ff3bc5fd003e2-20220804 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=S+iLJb80EvDWimTLjqOD1nOSy2+QSwLo1DqVRfZhONc=; b=Tr/eHgux8sWn1Qmdpdu2/dcEbSJhekwG4ttPClJ6HYH1y01ghdj0S4K4TOf07ebGV1Rz+naRYgxEm0AZUvrQQd5iWOGRTuVsQLFXrIxiTUdxojR1L25XNPMQlJ5HllbA7wHGlu82DLq/ICvsqLCiKLsVtrQzId2xaDdQcyyGFp8=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8,REQID:d2496d40-2e7d-43c7-b783-b09c0da80938,OB:0,LO B:0,IP:0,URL:5,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:5 X-CID-META: VersionHash:0f94e32,CLOUDID:61f728d1-841b-4e95-ad42-8f86e18f54fc,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:1,File:nil ,QS:nil,BEC:nil,COL:0 X-UUID: bbcfc82f14f54649a47ff3bc5fd003e2-20220804 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1400052859; Thu, 04 Aug 2022 08:26:34 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Thu, 4 Aug 2022 08:26:33 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 4 Aug 2022 08:26:33 +0800 From: To: , CC: , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH] mt76: mt7921: apply the previous MCU timeout Date: Thu, 4 Aug 2022 08:26:31 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sean Wang 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 --- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) if (!seq) 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;