Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA3D4C636D7 for ; Mon, 13 Feb 2023 02:51:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229831AbjBMCvt convert rfc822-to-8bit (ORCPT ); Sun, 12 Feb 2023 21:51:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjBMCvs (ORCPT ); Sun, 12 Feb 2023 21:51:48 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DA60EB4E; Sun, 12 Feb 2023 18:51:47 -0800 (PST) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 31D2pLKn9011757, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 31D2pLKn9011757 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Mon, 13 Feb 2023 10:51:21 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Mon, 13 Feb 2023 10:51:22 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Mon, 13 Feb 2023 10:51:22 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02]) by RTEXMBS04.realtek.com.tw ([fe80::b4a2:2bcc:48d1:8b02%5]) with mapi id 15.01.2375.007; Mon, 13 Feb 2023 10:51:22 +0800 From: Ping-Ke Shih To: Sascha Hauer , "linux-wireless@vger.kernel.org" CC: Neo Jou , Hans Ulli Kroll , Yan-Hsuan Chuang , Kalle Valo , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Martin Blumenstingl" , "kernel@pengutronix.de" , Alexander Hochbaum , Da Xue , Bernie Huang , Andreas Henriksson , Viktor Petrenko Subject: RE: [PATCH v2 2/3] wifi: rtw88: usb: send Zero length packets if necessary Thread-Topic: [PATCH v2 2/3] wifi: rtw88: usb: send Zero length packets if necessary Thread-Index: AQHZPUE0YX65zodR/06QawvaQ/K/Xa7MMYpg Date: Mon, 13 Feb 2023 02:51:22 +0000 Message-ID: <85afc4d7391e4585a02bd36b71ec4db3@realtek.com> References: <20230210111632.1985205-1-s.hauer@pengutronix.de> <20230210111632.1985205-3-s.hauer@pengutronix.de> In-Reply-To: <20230210111632.1985205-3-s.hauer@pengutronix.de> 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: RTEXMBS02.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:_2023/2/12_=3F=3F_10:57:00?= x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Sascha Hauer > Sent: Friday, February 10, 2023 7:17 PM > 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 ; Bernie Huang > ; Andreas Henriksson ; Viktor Petrenko ; Sascha > Hauer > Subject: [PATCH v2 2/3] wifi: rtw88: usb: send Zero length packets if necessary > > Zero length packets are necessary when sending URBs with size > multiple of bulkout_size, otherwise the hardware just stalls. > > Fixes: a82dfd33d1237 ("wifi: rtw88: Add common USB chip support") > Signed-off-by: Sascha Hauer Reviewed-by: Ping-Ke Shih > --- > drivers/net/wireless/realtek/rtw88/usb.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c > index d9e995544e405..1a09c9288198a 100644 > --- a/drivers/net/wireless/realtek/rtw88/usb.c > +++ b/drivers/net/wireless/realtek/rtw88/usb.c > @@ -271,6 +271,7 @@ static int rtw_usb_write_port(struct rtw_dev *rtwdev, u8 qsel, struct sk_buff *s > return -ENOMEM; > > usb_fill_bulk_urb(urb, usbd, pipe, skb->data, skb->len, cb, context); > + urb->transfer_flags |= URB_ZERO_PACKET; > ret = usb_submit_urb(urb, GFP_ATOMIC); > > usb_free_urb(urb); > -- > 2.30.2