Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3609764pxb; Mon, 24 Jan 2022 13:27:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzi/kc49j5AGyOCrBp20BJD1eKG59QyuFQngvOlPm+08/ZsKoEGm5PsJIiQPmIocc8epREN X-Received: by 2002:a17:902:b10d:b0:14b:4e8c:4859 with SMTP id q13-20020a170902b10d00b0014b4e8c4859mr6285265plr.95.1643059664135; Mon, 24 Jan 2022 13:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643059664; cv=none; d=google.com; s=arc-20160816; b=C8/dVp7oHvUypQiYP2raCmATQPFP+LqNGnkGvCQS+vJ0bhi1Lw/Z//vF02aSS1770b /id52uCSreM3vCNExJScPoOOUJ/cVKOC7RRJlbDlfO6RHzjt7ISk/30GPJGOnx5LOgZk Pegxkmz6KaYiYuUX/OzgOKav+1u0eohVa0/3ytIMg0eyIa7M2MVUVgyS/SCJxeu4WGtf zg7dA6lxL1BANM7iMq+0r3M4Fx2Sd+RjfJcJpgI6dGImFXx3LKgZN4J161j1tmxOJQqm nMBpBTOfD0VoePfhzGO/IKbUlCE5xQz2EpHYyf/6a4Z+i8RvAb30hUq60qFgm0eI9kLC nDAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EB5M9s/HXOFSnLfoRWqHe9ZmQvnBFCQemFbx8g3H0iQ=; b=ZRDK4puHHzPrCv4yAX6reqBFyLcOUiWbLwUXWChEkI7S/Bi35hRXsh37v7R+6b97X9 DiSa4mvOlgQK6ZKSzdY19wYCqM9SIlIPOMtR5Z2Tw38XgSRGHT3w9FlaP10n2VwMT1zJ fmAFHGLV3j4yt83XgKl7eLCdPA0YJMAVGY3yJLqt67iH765sdKqtql8dWjYWhf4URiNJ XSkTVRAQw9yThw6d7FlGZ/6JeoZ+kktIMFwrAVccfxK3feoUgMne7Go/BGzWqK7ruSqi EIEZ11ne+4iJznDJy9r3fES/4DfIDzBca0bP89RPYyWjFJM0H6iaosSBgb8XrawyeZBy ATuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Khxs4ATf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si13773224pfm.25.2022.01.24.13.27.31; Mon, 24 Jan 2022 13:27:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Khxs4ATf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444953AbiAXVBs (ORCPT + 99 others); Mon, 24 Jan 2022 16:01:48 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:40934 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350856AbiAXUic (ORCPT ); Mon, 24 Jan 2022 15:38:32 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 33C55B8122A; Mon, 24 Jan 2022 20:38:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52ADAC340E5; Mon, 24 Jan 2022 20:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056708; bh=HhDQ5gUAkE/Ixxh28y5d77/aIlgKWeORJlSTctk8v88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Khxs4ATfEb9W4H/VdFttibX7o/A2C0qV0mltJyU+jCWcY/c5dqo3hE1Sfij0OGuol zFX8s40TIl+wpb2FNoh++adMUxLlTrN3IQGXl+hGvKUD49DU1zbrSoLRMsahBPLYgs iCRF2Vid7bXcAAEockPwjTozM8n9LFVTO7OV4ky4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Po-Hao Huang , Ping-Ke Shih , Kalle Valo , Sasha Levin Subject: [PATCH 5.15 573/846] rtw88: 8822c: update rx settings to prevent potential hw deadlock Date: Mon, 24 Jan 2022 19:41:30 +0100 Message-Id: <20220124184120.804482602@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Po-Hao Huang [ Upstream commit c1afb26727d9e507d3e17a9890e7aaf7fc85cd55 ] These settings enables mac to detect and recover when rx fifo circuit deadlock occurs. Previous version missed this, so we fix it. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20211217012708.8623-1-pkshih@realtek.com Signed-off-by: Sasha Levin --- drivers/net/wireless/realtek/rtw88/main.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8821c.h | 2 +- drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +- drivers/net/wireless/realtek/rtw88/rtw8822c.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 6bb55e663fc36..69512856bb462 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -1859,7 +1859,7 @@ int rtw_core_init(struct rtw_dev *rtwdev) /* default rx filter setting */ rtwdev->hal.rcr = BIT_APP_FCS | BIT_APP_MIC | BIT_APP_ICV | - BIT_HTC_LOC_CTRL | BIT_APP_PHYSTS | + BIT_PKTCTL_DLEN | BIT_HTC_LOC_CTRL | BIT_APP_PHYSTS | BIT_AB | BIT_AM | BIT_APM; ret = rtw_load_firmware(rtwdev, RTW_NORMAL_FW); diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.h b/drivers/net/wireless/realtek/rtw88/rtw8821c.h index 112faa60f653e..d9fbddd7b0f35 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8821c.h +++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.h @@ -131,7 +131,7 @@ _rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data) #define WLAN_TX_FUNC_CFG2 0x30 #define WLAN_MAC_OPT_NORM_FUNC1 0x98 #define WLAN_MAC_OPT_LB_FUNC1 0x80 -#define WLAN_MAC_OPT_FUNC2 0x30810041 +#define WLAN_MAC_OPT_FUNC2 0xb0810041 #define WLAN_SIFS_CFG (WLAN_SIFS_CCK_CONT_TX | \ (WLAN_SIFS_OFDM_CONT_TX << BIT_SHIFT_SIFS_OFDM_CTX) | \ diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c index f1789155e9016..247f26e3e8192 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c @@ -204,7 +204,7 @@ static void rtw8822b_phy_set_param(struct rtw_dev *rtwdev) #define WLAN_TX_FUNC_CFG2 0x30 #define WLAN_MAC_OPT_NORM_FUNC1 0x98 #define WLAN_MAC_OPT_LB_FUNC1 0x80 -#define WLAN_MAC_OPT_FUNC2 0x30810041 +#define WLAN_MAC_OPT_FUNC2 0xb0810041 #define WLAN_SIFS_CFG (WLAN_SIFS_CCK_CONT_TX | \ (WLAN_SIFS_OFDM_CONT_TX << BIT_SHIFT_SIFS_OFDM_CTX) | \ diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c index f3ad079967a68..bc87e3cb9cdce 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c @@ -1962,7 +1962,7 @@ static void rtw8822c_phy_set_param(struct rtw_dev *rtwdev) #define WLAN_TX_FUNC_CFG2 0x30 #define WLAN_MAC_OPT_NORM_FUNC1 0x98 #define WLAN_MAC_OPT_LB_FUNC1 0x80 -#define WLAN_MAC_OPT_FUNC2 0x30810041 +#define WLAN_MAC_OPT_FUNC2 0xb0810041 #define WLAN_MAC_INT_MIG_CFG 0x33330000 #define WLAN_SIFS_CFG (WLAN_SIFS_CCK_CONT_TX | \ -- 2.34.1