Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1100191rwi; Thu, 3 Nov 2022 00:37:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76liH+X8RugokaoTWt++VtzHwnZB2UBaVv0UcdSxCOdnuOAmf6PlK0IFvsTdcS0WA5I02C X-Received: by 2002:a17:902:b697:b0:187:1acf:249c with SMTP id c23-20020a170902b69700b001871acf249cmr21225450pls.14.1667461066087; Thu, 03 Nov 2022 00:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667461066; cv=none; d=google.com; s=arc-20160816; b=vXy2fVyk2QB9KDHefx2jE3189EyAPLhWsi7Ob7QwxBRZsyRoR9+s8mGcru8RYvfgd1 GlQuVg6QpQXsm/uenIVF6GePRHccxKwwoLfdDuZlHMQWjIp5B4VOLW8jRvQxN5TkbSaI 5pnADhYNJJ8Q8bBeyuzuCGkrv9eOjGeRRg1UI3tQsAKMNlaXeAyqyNDkdDdHhrZE/Bxs VI4ShbL0hDiCCbb2odSAwzkSlTX05EbhhNbOInbiDnatYHmKA2U1xOMjJHeHXA6EwCGi URY4+Bm9VmJJmDF6Obz/SoMwWPK7tdVh/V8U+Myh0JshXbrSwfIu6RWlpcVXVb26sRPW mPzA== 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 :message-id:date:subject:cc:to:from:authenticated-by; bh=/CQCr0vZc3FHFbFduqq3Upx7DG+c8E+YmgYc0k5nsiE=; b=Y+jlDeATI+sqCMGwB5ISXgkMZPQytSag17QujjhBv1xIHVCt/MNmXvr4DGTlQpFCGH 8RLECjw1maOg1RFrIOenXYJnTsXwi1fOrz4y6VGEGlqXl0CVq8ctxgUuwiGE4lM6bNc9 WtjKovQhfgIuzKIFOreiuSsXfcupudKxO3VvmK+cU3xcKYAos9rEQv+ZKhA9mWY3EKgA /1ZjPBtRzjfhgQCBeTLM2VabgO8VH9Uj2n/7f2gxR11s9mR+f+GlaQoxoU0kzJKKwu0+ 6qTTCp7eyCUiPPuZMrSAgWsq+feRsj//3ieQPWGOzUUiYt7zg3hmDbPakLVoAQq2F8UZ Lc4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a656915000000b0046fcf7ac293si127230pgq.767.2022.11.03.00.37.36; Thu, 03 Nov 2022 00:37:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231290AbiKCH0I (ORCPT + 66 others); Thu, 3 Nov 2022 03:26:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231180AbiKCH0G (ORCPT ); Thu, 3 Nov 2022 03:26:06 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8859D103B for ; Thu, 3 Nov 2022 00:26:01 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 2A37P85h8008697, 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.81/5.90) with ESMTPS id 2A37P85h8008697 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 3 Nov 2022 15:25:08 +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_128_GCM_SHA256) id 15.1.2375.32; Thu, 3 Nov 2022 15:25:45 +0800 Received: from localhost (172.21.69.188) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Thu, 3 Nov 2022 15:25:44 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH] wifi: rtw89: 8852b: change debug mask of message of no TX resource Date: Thu, 3 Nov 2022 15:25:17 +0800 Message-ID: <20221103072517.15284-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.21.69.188] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: trusted connection X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Deterministic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 11/03/2022 06:59:00 X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: =?big5?B?Q2xlYW4sIGJhc2VzOiAyMDIyLzExLzMgpFekyCAwNjowMDowMA==?= X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 8852B has smaller TX FIFO than others in WiFi chip, so it would be buffer full frequently, but it doesn't affect TX performance. However, it shows verbose debug messages with RTW89_DBG_UNEXP mask that is to show up abnormal behavior, so change debug mask to RTW89_DBG_TXRX for 8852B. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/pci.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c index 07a2e23759f0b..99a254d7ba5ed 100644 --- a/drivers/net/wireless/realtek/rtw89/pci.c +++ b/drivers/net/wireless/realtek/rtw89/pci.c @@ -971,8 +971,10 @@ static u32 __rtw89_pci_check_and_reclaim_tx_resource(struct rtw89_dev *rtwdev, struct rtw89_pci *rtwpci = (struct rtw89_pci *)rtwdev->priv; struct rtw89_pci_tx_ring *tx_ring = &rtwpci->tx_rings[txch]; struct rtw89_pci_tx_wd_ring *wd_ring = &tx_ring->wd_ring; + const struct rtw89_chip_info *chip = rtwdev->chip; u32 bd_cnt, wd_cnt, min_cnt = 0; struct rtw89_pci_rx_ring *rx_ring; + enum rtw89_debug_mask debug_mask; u32 cnt; rx_ring = &rtwpci->rx_rings[RTW89_RXCH_RPQ]; @@ -996,10 +998,16 @@ static u32 __rtw89_pci_check_and_reclaim_tx_resource(struct rtw89_dev *rtwdev, bd_cnt = rtw89_pci_get_avail_txbd_num(tx_ring); wd_cnt = wd_ring->curr_num; min_cnt = min(bd_cnt, wd_cnt); - if (min_cnt == 0) - rtw89_debug(rtwdev, rtwpci->low_power ? RTW89_DBG_TXRX : RTW89_DBG_UNEXP, + if (min_cnt == 0) { + if (rtwpci->low_power || chip->chip_id == RTL8852B) + debug_mask = RTW89_DBG_TXRX; + else + debug_mask = RTW89_DBG_UNEXP; + + rtw89_debug(rtwdev, debug_mask, "still no tx resource after reclaim: wd_cnt=%d bd_cnt=%d\n", wd_cnt, bd_cnt); + } out_unlock: spin_unlock_bh(&rtwpci->trx_lock); -- 2.25.1