Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1938401rdb; Sat, 20 Jan 2024 23:19:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3b0aLL0+BScEeMJq1T4G3Df5cF5mdd3y/VzJxGwu/slLx5+UkNJ1cssYJUytkAZ94JSkJ X-Received: by 2002:a17:906:c215:b0:a2c:3d75:fb7 with SMTP id d21-20020a170906c21500b00a2c3d750fb7mr997466ejz.4.1705821563528; Sat, 20 Jan 2024 23:19:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705821563; cv=pass; d=google.com; s=arc-20160816; b=czNvHFaM3WvnFOtV9nzykpIGlqrsezdoqBP8EIEKPuCtwlfBDz12F0xXtTnUDjJy8A DKBpCY3iMFgg6W/8IeoWKksDgtwPULvg8rJBzO9Mm9Io11JQNbLzrl2eBiOki/Y+SMbZ 2KrDY2cwqJNBLE89vnQZgVWTR7BG5G21Ir8DazKVV96brKqjVzXjOG4F5HgvM7P/1QzA YyqhSVwN8HHdHchUMahiZw9SXQuzqF1mrtis/FjUyu35tPtRmy99N1kp0uZZJaG+I4/2 DeDk+kjfm9CUZzXQNY7iVjbbXiIMIkggT3FReQviw9p2OklpeIljuZcvC1LmKKFlo669 Ll3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=6Vi7X1o3cGdWIQ9ue1xbLRblesfAye6ZWn6EzxyFEmA=; fh=TSuyMlfOTyCx0zt3ucDyTttlN37QPvmvgk5pf20rBgY=; b=oHtTDcDM/lm+lkUG263siSXOi3yOXdYU2ZdKJ0xU3rzVYtxmHip9TlxCLDU5IbkQEj g71gdlqCvRnPHNHP0VuA3L6FUYSUqkG4ld+QOsy99Mn1p9iotGvFCHouXFBqdyj7cPGb b4LlMZEC5YzCtQ0zATQVrmRve2gwa3GE/sPY07Jp5vTs/CeYyvOrLlGMIWwaSX+c+FLl BgmAB65XXgj9O/yy1NTg21kxJzSB715R4hGdghLpWXfwCrTNmRrIg6cURqaOxgvhY0GA 1ihOIjgilmoQGnXSRCjchfdRLPLHXdLRZV9u9nnvUgvcpRF4W97Uej5x+BfP/NwrnlhW fwLw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-2295-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2295-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id kt16-20020a170906aad000b00a2fd7a04636si1292580ejb.511.2024.01.20.23.19.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 23:19:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2295-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-2295-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2295-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4BAD41F23312 for ; Sun, 21 Jan 2024 07:19:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C7CA36134; Sun, 21 Jan 2024 07:19:09 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3018236136 for ; Sun, 21 Jan 2024 07:19:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705821549; cv=none; b=iVtiiiQ57oMCC9Xjl5x34nY3aOlyasGNn6l3RCivLsGpPZIUXEoKTScxOKKeQzyCrNQWd04dH5bw5tfXiqm1h+WAqmH3PUDWsdjvu4LGJd7m53YEqiZArTGEIzfBZtcqdFnIakJ/2TXf+Z3UiIPnGOuk2TOdpGKiiQqTdKu674g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705821549; c=relaxed/simple; bh=DUhCKy54Szw4KS/OtETrlpxzBKoG31ljAoZiCMwWtOE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lsLbAtgd3m8yyy+7eWfRsT15EILlLKp+GMdxkBpB3/9MY9IdyvXalX5t8kagigJXp9IMNlvj8urNtkv406EzkbWFm8L5Jg8kU1s9s3+xXJpCNmBCgMKZY+0/djJEAtu2IfthB3J3zyMVHYenlR9jGgrk2eoHaxz06ICu6QumGR4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 40L7IsfZ63102115, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 40L7IsfZ63102115 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 21 Jan 2024 15:18:54 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.32; Sun, 21 Jan 2024 15:18:54 +0800 Received: from [127.0.1.1] (172.16.17.107) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Sun, 21 Jan 2024 15:18:53 +0800 From: Ping-Ke Shih To: CC: , Subject: [PATCH 1/4] wifi: rtw89: pci: update SER timer unit and timeout time Date: Sun, 21 Jan 2024 15:18:23 +0800 Message-ID: <20240121071826.10159-2-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240121071826.10159-1-pkshih@realtek.com> References: <20240121071826.10159-1-pkshih@realtek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback Be higher resolution of SER timer unit from 32ms to 16ms to detect abnormal situation more accurately, and set hardware watchdog timer to 4ms. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/pci_be.c | 5 +++++ drivers/net/wireless/realtek/rtw89/reg.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/pci_be.c b/drivers/net/wireless/realtek/rtw89/pci_be.c index 629ffa4bee91..5c9e39357773 100644 --- a/drivers/net/wireless/realtek/rtw89/pci_be.c +++ b/drivers/net/wireless/realtek/rtw89/pci_be.c @@ -105,6 +105,10 @@ static void rtw89_pci_ctrl_trxdma_pcie_be(struct rtw89_dev *rtwdev, val |= B_BE_STOP_AXI_MST; rtw89_write32(rtwdev, R_BE_HAXI_INIT_CFG1, val); + + if (io_en == MAC_AX_PCIE_ENABLE) + rtw89_write32_mask(rtwdev, R_BE_HAXI_MST_WDT_TIMEOUT_SEL_V1, + B_BE_HAXI_MST_WDT_TIMEOUT_SEL_MASK, 4); } static void rtw89_pci_clr_idx_all_be(struct rtw89_dev *rtwdev) @@ -257,6 +261,7 @@ static void rtw89_pci_ser_setting_be(struct rtw89_dev *rtwdev) rtw89_write32(rtwdev, R_BE_PL1_DBG_INFO, 0x0); rtw89_write32_set(rtwdev, R_BE_FWS1IMR, B_BE_PCIE_SER_TIMEOUT_INDIC_EN); rtw89_write32_set(rtwdev, R_BE_SER_PL1_CTRL, B_BE_PL1_SER_PL1_EN); + rtw89_write32_mask(rtwdev, R_BE_SER_PL1_CTRL, B_BE_PL1_TIMER_UNIT_MASK, 1); val32 = rtw89_read32(rtwdev, R_BE_REG_PL1_MASK); val32 |= B_BE_SER_PMU_IMR | B_BE_SER_L1SUB_IMR | B_BE_SER_PM_MASTER_IMR | diff --git a/drivers/net/wireless/realtek/rtw89/reg.h b/drivers/net/wireless/realtek/rtw89/reg.h index b411bf726849..e1802fe04576 100644 --- a/drivers/net/wireless/realtek/rtw89/reg.h +++ b/drivers/net/wireless/realtek/rtw89/reg.h @@ -5727,6 +5727,9 @@ #define B_BE_STOP_CH1 BIT(1) #define B_BE_STOP_CH0 BIT(0) +#define R_BE_HAXI_MST_WDT_TIMEOUT_SEL_V1 0xB02C +#define B_BE_HAXI_MST_WDT_TIMEOUT_SEL_MASK GENMASK(4, 0) + #define R_BE_HAXI_IDCT_MSK 0xB0B8 #define B_BE_HAXI_RRESP_ERR_IDCT_MSK BIT(7) #define B_BE_HAXI_BRESP_ERR_IDCT_MSK BIT(6) -- 2.25.1