Message ID | 20230210111632.1985205-1-s.hauer@pengutronix.de |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp893175wrn; Fri, 10 Feb 2023 03:19:14 -0800 (PST) X-Google-Smtp-Source: AK7set9nYjdW+Sy7ZdSc/RWQFuNaARWBvLob7taLhuL7ORDB7JOYpK2YKASvF7Lq0iYN9A34oybd X-Received: by 2002:a50:99c7:0:b0:4aa:6c75:caff with SMTP id n7-20020a5099c7000000b004aa6c75caffmr6501228edb.1.1676027954302; Fri, 10 Feb 2023 03:19:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676027954; cv=none; d=google.com; s=arc-20160816; b=tYjybS2WAJf2MF7bBlNA9g8U218SSLVklPnXxl67NT41nFpBmzgFxV5vnqAeMFe2jc YNYGEdVBCj7SXoen3eyUA1ZsWFtWJ+i3qucsXGh1lF9ytJAyE0i0cwS01wD2GROgkqkx P3TrnTkWq7NnSUavmCp+Gwd8TAMgVmDJRFOmum3RAmSYAqDaTdxUhcEZtFfYMX704f1n aFcEHtaKU41S5mihZOO+l/QjdvgnZc1YvwxIKDXd+JtdO9VmmzDzqcibwJFS2ssJR4SA B9dqlIbpHRcx1TIf7T9++72DlZZKQ1pn9BfokL7Q0K244x5h+Z1tzU9zO19UC2d+msnX 6SDQ== 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=CrPinRlyJz86rJvJobnghat0LtHnwge4yttH1zxgoc8=; b=HiZwwluCtT9goqwp9H2hVjRtb0YKflbZPnMEoXO0O4O8fnvEHwGpUQW/mAtfpDA6Hd uZKPP7Io5RImKw+cl5OFqxIfpZNOLKYU3MDDFVz2kdCFCM8NInYNm8r7PmnPIB2jbs4F vtl+JKFEGjrYuXFKpVrD7el7MeDguGXX9KVMlR8U936lP1pWT9JDlqxcaRFIIHi2/6IP xh2+Tt/c+OfGAKDj9QT9E91MJ8xsasuFD0Vh710P/nxi9wj4AFpZdPIVP3SaeHtmirGa yclOtFIwXO0tXQgwjW26BBkIPQ2BEpEPcGVIJki9Cdrj9SbRQdO0AVpC/9XMUsuSwg1P pJOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r3-20020a056402034300b0046db48205e6si5270487edw.77.2023.02.10.03.18.51; Fri, 10 Feb 2023 03:19:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232111AbjBJLRB (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Fri, 10 Feb 2023 06:17:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232041AbjBJLQx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Feb 2023 06:16:53 -0500 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 DAF4E72DF5 for <linux-kernel@vger.kernel.org>; Fri, 10 Feb 2023 03:16:44 -0800 (PST) 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 <sha@pengutronix.de>) id 1pQROO-0003KV-Ot; Fri, 10 Feb 2023 12:16:36 +0100 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 <sha@pengutronix.de>) id 1pQROM-003xEW-CS; Fri, 10 Feb 2023 12:16:35 +0100 Received: from sha by dude02.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <sha@pengutronix.de>) id 1pQROM-008k9X-Mu; Fri, 10 Feb 2023 12:16:34 +0100 From: Sascha Hauer <s.hauer@pengutronix.de> To: linux-wireless@vger.kernel.org Cc: Neo Jou <neojou@gmail.com>, Hans Ulli Kroll <linux@ulli-kroll.de>, Ping-Ke Shih <pkshih@realtek.com>, Yan-Hsuan Chuang <tony0620emma@gmail.com>, Kalle Valo <kvalo@kernel.org>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Blumenstingl <martin.blumenstingl@googlemail.com>, kernel@pengutronix.de, Alexander Hochbaum <alex@appudo.com>, Da Xue <da@libre.computer>, Po-Hao Huang <phhuang@realtek.com>, Andreas Henriksson <andreas@fatal.se>, Viktor Petrenko <g0000ga@gmail.com>, Sascha Hauer <s.hauer@pengutronix.de> Subject: [PATCH v2 0/3] wifi: rtw88: USB fixes Date: Fri, 10 Feb 2023 12:16:29 +0100 Message-Id: <20230210111632.1985205-1-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.30.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-kernel@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 autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757436261520105935?= X-GMAIL-MSGID: =?utf-8?q?1757442688363709502?= |
Series | wifi: rtw88: USB fixes | |
Message
Sascha Hauer
Feb. 10, 2023, 11:16 a.m. UTC
This series addresses issues for the recently added RTW88 USB support reported by Andreas Henriksson and also our customer. The hardware can't handle urbs that have a size of multiple of the bulkout_size (usually 512 bytes). The symptom is that the hardware stalls completely. The issue can be reproduced by sending a suitably sized ping packet from the device: ping -s 394 <somehost> (It's 394 bytes here on a RTL8822CU and RTL8821CU, the actual size may differ on other chips, it was 402 bytes on a RTL8723DU) Other than that qsel was not set correctly. The sympton here is that only one of multiple bulk endpoints was used to send data. Changes since v1: - Use URB_ZERO_PACKET to let the USB host controller handle it automatically rather than working around the issue. Sascha Hauer (3): wifi: rtw88: usb: Set qsel correctly wifi: rtw88: usb: send Zero length packets if necessary wifi: rtw88: usb: drop now unnecessary URB size check drivers/net/wireless/realtek/rtw88/usb.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-)
Comments
Hello Sacha Hauer, Thanks alot for fixing this! On Fri, Feb 10, 2023 at 12:16:29PM +0100, Sascha Hauer wrote: > This series addresses issues for the recently added RTW88 USB support > reported by Andreas Henriksson and also our customer. > > The hardware can't handle urbs that have a size of multiple of the > bulkout_size (usually 512 bytes). The symptom is that the hardware > stalls completely. The issue can be reproduced by sending a suitably > sized ping packet from the device: > > ping -s 394 <somehost> > > (It's 394 bytes here on a RTL8822CU and RTL8821CU, the actual size may > differ on other chips, it was 402 bytes on a RTL8723DU) I can confirm that with these patches applied that my LM842 dongle now works reliably on my imx6sx board. On the same board the traffic would previously usually stall after 80-130MB when downloading. With patches applied I succesfully completed: wget -O /dev/null http://speedtest.tele2.net/10GB.zip Uploading did not seem to trigger the problem before but I still tested and uploading a gigabyte was no problem using: curl -T /dev/urandom http://speedtest.tele2.net/upload.php -O /dev/null Did not attempt the suggested ping method of reproducing on the old system, but on the new kernel I could do $ for a in $(seq 128 512); do ping -n -c 3 -s $a ping.sunet.se ; done without any stalls. Feel free to add either or both of: Reported-by: Andreas Henriksson <andreas@fatal.se> Tested-by: Andreas Henriksson <andreas@fatal.se> > > Other than that qsel was not set correctly. The sympton here is that > only one of multiple bulk endpoints was used to send data. > > Changes since v1: > - Use URB_ZERO_PACKET to let the USB host controller handle it automatically > rather than working around the issue. > > Sascha Hauer (3): > wifi: rtw88: usb: Set qsel correctly > wifi: rtw88: usb: send Zero length packets if necessary > wifi: rtw88: usb: drop now unnecessary URB size check > > drivers/net/wireless/realtek/rtw88/usb.c | 18 +++--------------- > 1 file changed, 3 insertions(+), 15 deletions(-) > > -- > 2.30.2 > Regards, Andreas Henriksson
On Fri, Feb 10, 2023 at 12:16:29PM +0100, Sascha Hauer wrote: > This series addresses issues for the recently added RTW88 USB support > reported by Andreas Henriksson and also our customer. > > The hardware can't handle urbs that have a size of multiple of the > bulkout_size (usually 512 bytes). The symptom is that the hardware > stalls completely. The issue can be reproduced by sending a suitably > sized ping packet from the device: > > ping -s 394 <somehost> > > (It's 394 bytes here on a RTL8822CU and RTL8821CU, the actual size may > differ on other chips, it was 402 bytes on a RTL8723DU) > > Other than that qsel was not set correctly. The sympton here is that > only one of multiple bulk endpoints was used to send data. > > Changes since v1: > - Use URB_ZERO_PACKET to let the USB host controller handle it automatically > rather than working around the issue. > > Sascha Hauer (3): > wifi: rtw88: usb: Set qsel correctly > wifi: rtw88: usb: send Zero length packets if necessary > wifi: rtw88: usb: drop now unnecessary URB size check These patches went in upstream as: 7869b834fb07c wifi: rtw88: usb: Set qsel correctly 07ce9fa6ab0e5 wifi: rtw88: usb: send Zero length packets if necessary 462c8db6a0116 wifi: rtw88: usb: drop now unnecessary URB size check These patches make the RTW88 USB support much more reliable. Can they be picked for the current 6.2 stable series please? Sascha
On Wed, Mar 01, 2023 at 08:11:41AM +0100, Sascha Hauer wrote: > On Fri, Feb 10, 2023 at 12:16:29PM +0100, Sascha Hauer wrote: > > This series addresses issues for the recently added RTW88 USB support > > reported by Andreas Henriksson and also our customer. > > > > The hardware can't handle urbs that have a size of multiple of the > > bulkout_size (usually 512 bytes). The symptom is that the hardware > > stalls completely. The issue can be reproduced by sending a suitably > > sized ping packet from the device: > > > > ping -s 394 <somehost> > > > > (It's 394 bytes here on a RTL8822CU and RTL8821CU, the actual size may > > differ on other chips, it was 402 bytes on a RTL8723DU) > > > > Other than that qsel was not set correctly. The sympton here is that > > only one of multiple bulk endpoints was used to send data. > > > > Changes since v1: > > - Use URB_ZERO_PACKET to let the USB host controller handle it automatically > > rather than working around the issue. > > > > Sascha Hauer (3): > > wifi: rtw88: usb: Set qsel correctly > > wifi: rtw88: usb: send Zero length packets if necessary > > wifi: rtw88: usb: drop now unnecessary URB size check > > These patches went in upstream as: > > 7869b834fb07c wifi: rtw88: usb: Set qsel correctly > 07ce9fa6ab0e5 wifi: rtw88: usb: send Zero length packets if necessary > 462c8db6a0116 wifi: rtw88: usb: drop now unnecessary URB size check > > These patches make the RTW88 USB support much more reliable. Can they be > picked for the current 6.2 stable series please? All now queued up, thanks. greg k-h