Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2685038rwb; Mon, 7 Nov 2022 16:47:33 -0800 (PST) X-Google-Smtp-Source: AMsMyM6uwIrrBs/S/oLWSTC1gU7op/gHG/t6IFNzOWfyBa/LVP7AbGbdz8Um2vH6DnAu5XSCYIYG X-Received: by 2002:a17:907:2d1e:b0:7a9:c2f9:2c2c with SMTP id gs30-20020a1709072d1e00b007a9c2f92c2cmr50348337ejc.405.1667868452831; Mon, 07 Nov 2022 16:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667868452; cv=none; d=google.com; s=arc-20160816; b=fo0hqbIv/THxVPUEL1OYlXSlFUY3ScjG9OJQBy5JdSGLuHfPoj0nOMXld3VAlJfLhr /AMPdpD6LqGPalR0DloXARy3Mucys+0tRjiZ3oEOott71oHlSU+7vUyFY4xMf65JCT1v 0fHoyBCOhxnDpH1PXLmja239QHbZDxPdQ9Yh5a6zD+OXyUlRB3zDa8TYIILWszQJMEV+ 6bEBdprDvTI1CptlpfPbKJneLAYZyCdJIwC8J2Ot1WZfuq+p3R3/bEcNH1ASJ2FRpX8c DiFjEVoaExo1v35BeKdQ/R8jAZKnqv28wmblzjH78U2o2kzIUOP+1mJLvzdCmsSXNrvs yQBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=b+G5SkMTh29cXvwk++tfwdDvTs4ro1j7z6eaZPaCByU=; b=lS8/MTboubCeDlbrZQkm9ewFLgnrBvKkAryRbwaxgLrqSkTtR3M6rGhb0bQbVcd9Yd K7tjYkFErQ19PPnSKn6lzbGPI2+AgdUq5gt8obxWqFDDtab7y2HVE/Z7ZFQjvkjJQoAT icpzf0N7LKIEAzwZfen45Mywo+SNF6ihfBEMn/q6+0T1NvZv9X3dAzxuHo7/5BKUK1f5 qtraWLB/BUODCstqs0/pH5rcBZghOZ6t2uEimxVQfK8KE1SDxcdLCLD4/MqLqQjwLmPi s6YYWIbN1s+f5NpxR4CZRrMZIcc4QzFGg+6lY7gKV19RwTfloYI4PCnPSOrA5pQj7qh0 Xqwg== 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 w17-20020a056402269100b00461f2b974d2si11397434edd.339.2022.11.07.16.47.16; Mon, 07 Nov 2022 16:47:32 -0800 (PST) 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 S232110AbiKHAmr convert rfc822-to-8bit (ORCPT + 67 others); Mon, 7 Nov 2022 19:42:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231172AbiKHAmq (ORCPT ); Mon, 7 Nov 2022 19:42:46 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ABE9724F34 for ; Mon, 7 Nov 2022 16:42:45 -0800 (PST) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 2A80fxXgB012793, 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 2A80fxXgB012793 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Tue, 8 Nov 2022 08:41:59 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) 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; Tue, 8 Nov 2022 08:42:37 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 8 Nov 2022 08:42:36 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::15b5:fc4b:72f3:424b]) by RTEXMBS04.realtek.com.tw ([fe80::15b5:fc4b:72f3:424b%5]) with mapi id 15.01.2375.007; Tue, 8 Nov 2022 08:42:36 +0800 From: Ping-Ke Shih To: Kalle Valo CC: "linux-wireless@vger.kernel.org" Subject: RE: [PATCH] wifi: rtw89: 8852b: change debug mask of message of no TX resource Thread-Topic: [PATCH] wifi: rtw89: 8852b: change debug mask of message of no TX resource Thread-Index: AQHY71WQnsVH3zhrYUyie5/LKnbp8a4za3DVgADLfzA= Date: Tue, 8 Nov 2022 00:42:36 +0000 Message-ID: References: <20221103072517.15284-1-pkshih@realtek.com> <87sfivt05w.fsf@kernel.org> In-Reply-To: <87sfivt05w.fsf@kernel.org> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXDAG02.realtek.com.tw, 9 x-kse-attachmentfiltering-interceptor-info: no applicable attachment filtering rules found x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?us-ascii?Q?Clean,_bases:_2022/11/7_=3F=3F_10:50:00?= x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled 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 > -----Original Message----- > From: Kalle Valo > Sent: Monday, November 7, 2022 8:33 PM > To: Ping-Ke Shih > Cc: linux-wireless@vger.kernel.org > Subject: Re: [PATCH] wifi: rtw89: 8852b: change debug mask of message of no TX resource > > Ping-Ke Shih writes: > > > 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); > > + } > > Changing the debug mask like this looks a bit weird to me. At least it > would be good to have a comment in the code explainin why this is done > like this. > I will add a comment to figure out the reason. Ping-Ke