Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6968893rwl; Wed, 22 Mar 2023 19:30:48 -0700 (PDT) X-Google-Smtp-Source: AK7set92f5iY9/baiLTpQHEsiKBqFpEmw5N2IDqpcRHOsfXAPED2RzHkAyLKpnjSQlEHL0u4B1xO X-Received: by 2002:a05:6402:742:b0:4fb:3054:232e with SMTP id p2-20020a056402074200b004fb3054232emr8540449edy.26.1679538648684; Wed, 22 Mar 2023 19:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679538648; cv=none; d=google.com; s=arc-20160816; b=tRMLbGmQgx99zUru0P+z3Hc4ea+aFBjiSe/IGM4ksc8mzJPw5O6vGAv2cIpqJHXn+s jhl9ABTLpg7CnvvBw3oTq2fE0pCTe56dfeacjGVSCQKvEQFPq9NnpBpPJJ3FIpRj3Dyz JBtXptDB7VpUicuAP97t9zNzjZvDEoaPFeKbeMYwKC3byg+dyhJsOLZ70wpWkWmGAYd5 lLbGTGYoU8FCZOnyrb5+uTvYXlJIpH8pROedSPCyJwG38krsYP3wFwWEOctRb1rxx2CT v7vlpwyUu4I3FaGvqwanYHEJyYPb7PTjS/yDk8MPaojay7jRvB2xq1hy9Qpre2X8vxOy 4Kjg== 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=rk+ojMyYcSYebeA3/rzxCjJCkPlrDfLqx/qQelwHE0w=; b=soqnAlht0Bb7pkOYwuxyMpvXwrDOO05EJluc65Ef5/ZCSZcLF0U7qGRLVdLBiddQwE UIgY6IB0OkhMBTbTXLNsAY8d8cUBV9BB+8ooffCZA1v7ZVd0/M9E4ibNV8gehe9JwnZm SsEtuhz5g9Z687shMQqYdNXunH+VrCIEKKhvCBNrXD/oUoaR/3fnDjL3VQafBubnK2Bj VrzHuKamEre5IrJR+WrOkjRJiUxxgYEwcT/keYkFZ5gU8hPlHXyyLey0ZUnHlfOzdlUN Y1op2DcYQ6ZpMjWjdiaznAq3QtDMj+M28lKWIVLmEWnzpboLu4kGgE1mzw2v0Xob6rYw ivMA== 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 k26-20020a05640212da00b004bba31f3e01si17086399edx.65.2023.03.22.19.30.33; Wed, 22 Mar 2023 19:30:48 -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 S229995AbjCWC3D convert rfc822-to-8bit (ORCPT + 60 others); Wed, 22 Mar 2023 22:29:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbjCWC26 (ORCPT ); Wed, 22 Mar 2023 22:28:58 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9FC48A73; Wed, 22 Mar 2023 19:28:51 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 32N2SJcS4005671, 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 32N2SJcS4005671 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Thu, 23 Mar 2023 10:28:19 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) 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.17; Thu, 23 Mar 2023 10:28:34 +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; Thu, 23 Mar 2023 10:28:34 +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; Thu, 23 Mar 2023 10:28:34 +0800 From: Ping-Ke Shih To: Martin Blumenstingl , "linux-wireless@vger.kernel.org" CC: Yan-Hsuan Chuang , Kalle Valo , Ulf Hansson , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-mmc@vger.kernel.org" , Chris Morgan , "Nitin Gupta" , Neo Jou , Jernej Skrabec , Larry Finger Subject: RE: [PATCH v3 5/9] wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards Thread-Topic: [PATCH v3 5/9] wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards Thread-Index: AQHZW3Pm2NYSSGss/0ucWqQyYxl0iK8Hp1pA Date: Thu, 23 Mar 2023 02:28:34 +0000 Message-ID: <6f57da7c547f424194b2cf1d03fadfeb@realtek.com> References: <20230320213508.2358213-1-martin.blumenstingl@googlemail.com> <20230320213508.2358213-6-martin.blumenstingl@googlemail.com> In-Reply-To: <20230320213508.2358213-6-martin.blumenstingl@googlemail.com> 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-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=0.0 required=5.0 tests=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-wireless@vger.kernel.org > -----Original Message----- > From: Martin Blumenstingl > Sent: Tuesday, March 21, 2023 5:35 AM > To: linux-wireless@vger.kernel.org > Cc: Yan-Hsuan Chuang ; Kalle Valo ; Ulf Hansson > ; linux-kernel@vger.kernel.org; netdev@vger.kernel.org; > linux-mmc@vger.kernel.org; Chris Morgan ; Nitin Gupta ; > Neo Jou ; Ping-Ke Shih ; Jernej Skrabec ; > Larry Finger ; Martin Blumenstingl > Subject: [PATCH v3 5/9] wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards > > For SDIO host controllers with DMA support the TX buffer physical memory > address need to be aligned at an 8-byte boundary. Reserve 8 bytes of > extra TX headroom so we can align the data without re-allocating the > transmit buffer. > > While here, also remove the TODO comment regarding extra headroom for > USB and SDIO. For SDIO the extra headroom is now handled and for USB it > was not needed so far. > > Signed-off-by: Martin Blumenstingl Reviewed-by: Ping-Ke Shih > --- > Changes since v2: > - none > > Changes since v1: > - none > > > drivers/net/wireless/realtek/rtw88/main.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c > index cdc4703ead5f..1cb553485cff 100644 > --- a/drivers/net/wireless/realtek/rtw88/main.c > +++ b/drivers/net/wireless/realtek/rtw88/main.c > @@ -2163,9 +2163,11 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw) > int max_tx_headroom = 0; > int ret; > > - /* TODO: USB & SDIO may need extra room? */ > max_tx_headroom = rtwdev->chip->tx_pkt_desc_sz; > > + if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO) > + max_tx_headroom += RTW_SDIO_DATA_PTR_ALIGN; > + > hw->extra_tx_headroom = max_tx_headroom; > hw->queues = IEEE80211_NUM_ACS; > hw->txq_data_size = sizeof(struct rtw_txq); > -- > 2.40.0