Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5576668rwd; Wed, 24 May 2023 04:02:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5wAi6iKoKgAfHNOwN6NpnonC/r1wXgOUpz+6/krDZp5L0Xsjv19ujiycStMl10fSZgeyxl X-Received: by 2002:a17:903:1d2:b0:1af:d812:d16 with SMTP id e18-20020a17090301d200b001afd8120d16mr3318651plh.21.1684926158497; Wed, 24 May 2023 04:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684926158; cv=none; d=google.com; s=arc-20160816; b=P7+KzOegiBSBYvdQSO942gv2TUahEziUXKvy4N9G/Zcvaq3SmO1L5i6e0/CkvYfB6m zT2X8PyTD9jwvfeme9TGZwaVNZW0mq4MHHR2R0UyGB4SBD4EOJFHIqOy6Os+xkv6c8js CDL3NNvlzf4i0gKn0vDQVl1ljTf2wAE/s6s6aOL6v/AUfFe/RxBFBQmpBbBw3SspODHC BwLBdZMdO9vd3FNaFBEFgMsuigNjxU4p/7jNDNbqyN79F2lf5NTUuVnRROSHjez7Ydse U7g99xDDc4XlmWlnqtNp9C0iKzCRn/hbtK4LJUFDxl4hhaUm6wUv+MgVnIq5L0sOwvh7 qOZA== 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; bh=9VBtI2kRjpj1qMV7TNlmMMJeRsW+mtuyrBfOh5CHxVo=; b=LVmKmIdoJWcHtyY+QY4gkXLMBgtDRyDxufXEPRIzwHU+MPtBEJ1UJKx0cVTTWt+xEs xUlZj8DnOjyYTJNq12b8lTcomMC62fIrf+/F2PtzW301vdOVD5W742hNCdc2o+wa1p5H ug4Ql4tWGwnBswPTqi+2SNmrKf2NXsADl19cr/b8dGjyCJT6pTu0rzmq8dOC9GsZTdz3 va4mJlv5RfBLw+udbJPJLkaZ5X1syZdjU+g30bjY0VB7C3yHxGJrYpPZo1zJemvsWLj/ WuKhgl+gzD2J0I/szHcz1d48oCTgLAISQuz0voap3WNKUC6O86ZbmS2uLQOpZcTFyMcb 1ROg== 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 jb7-20020a170903258700b001a6919158cbsi7810869plb.167.2023.05.24.04.02.27; Wed, 24 May 2023 04:02:38 -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 S231787AbjEXKkM (ORCPT + 62 others); Wed, 24 May 2023 06:40:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230191AbjEXKkL (ORCPT ); Wed, 24 May 2023 06:40:11 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF204184 for ; Wed, 24 May 2023 03:40:07 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1luY-0007Bz-79; Wed, 24 May 2023 12:40:06 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1q1luS-002Sq9-Q2; Wed, 24 May 2023 12:40:00 +0200 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1q1luS-004JJK-8p; Wed, 24 May 2023 12:40:00 +0200 From: Sascha Hauer To: linux-wireless Cc: Hans Ulli Kroll , Larry Finger , Pkshih , Tim K , "Alex G ." , Nick Morrow , Viktor Petrenko , Andreas Henriksson , ValdikSS , kernel@pengutronix.de, petter@technux.se, Sascha Hauer Subject: [PATCH] wifi: rtw88: usb: silence log flooding error message Date: Wed, 24 May 2023 12:39:34 +0200 Message-Id: <20230524103934.1019096-1-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 When receiving more rx packets than the kernel can handle the driver drops the packets and issues an error message. This is bad for two reasons. The logs are flooded with myriads of messages, but then time consumed for printing messages in that critical code path brings down the device. After some time of excessive rx load the driver responds with: rtw_8822cu 1-1:1.2: failed to get tx report from firmware rtw_8822cu 1-1:1.2: firmware failed to report density after scan rtw_8822cu 1-1:1.2: firmware failed to report density after scan The device stops working until being replugged. Fix this by lowering the priority to debug level and also by ratelimiting it. Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support") Signed-off-by: Sascha Hauer --- drivers/net/wireless/realtek/rtw88/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index 44a5fafb99055..976eafa739a2d 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -535,7 +535,7 @@ static void rtw_usb_rx_handler(struct work_struct *work) } if (skb_queue_len(&rtwusb->rx_queue) >= RTW_USB_MAX_RXQ_LEN) { - rtw_err(rtwdev, "failed to get rx_queue, overflow\n"); + dev_dbg_ratelimited(rtwdev->dev, "failed to get rx_queue, overflow\n"); dev_kfree_skb_any(skb); continue; } -- 2.39.2