From patchwork Fri Feb 10 11:16:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 5232 Return-Path: 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 + 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 ); 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 ; 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 ) 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 ) 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 ) id 1pQROM-008k9X-Mu; Fri, 10 Feb 2023 12:16:34 +0100 From: Sascha Hauer To: linux-wireless@vger.kernel.org Cc: Neo Jou , Hans Ulli Kroll , Ping-Ke Shih , Yan-Hsuan Chuang , Kalle Valo , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Blumenstingl , kernel@pengutronix.de, Alexander Hochbaum , Da Xue , Po-Hao Huang , Andreas Henriksson , Viktor Petrenko , Sascha Hauer 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 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: 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?= 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 (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(-) Reported-by: Andreas Henriksson Tested-by: Andreas Henriksson