summaryrefslogtreecommitdiffstats
path: root/brcmfmac-BCM4329-Fixes-and-improvement.patch
blob: cd1886d10799cc0ed53931a538ab71ccc40015a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
From patchwork Sun Aug 30 19:14:38 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Dmitry Osipenko <digetx@gmail.com>
X-Patchwork-Id: 11745287
X-Patchwork-Delegate: kvalo@adurom.com
Return-Path: <SRS0=8jSp=CI=vger.kernel.org=linux-wireless-owner@kernel.org>
Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org
 [172.30.200.123])
	by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D83D722
	for <patchwork-linux-wireless@patchwork.kernel.org>;
 Sun, 30 Aug 2020 19:18:07 +0000 (UTC)
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
	by mail.kernel.org (Postfix) with ESMTP id 74984206F0
	for <patchwork-linux-wireless@patchwork.kernel.org>;
 Sun, 30 Aug 2020 19:18:07 +0000 (UTC)
Authentication-Results: mail.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
 header.b="nVMf6eR/"
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
        id S1727940AbgH3TRr (ORCPT
        <rfc822;patchwork-linux-wireless@patchwork.kernel.org>);
        Sun, 30 Aug 2020 15:17:47 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36384 "EHLO
        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
        with ESMTP id S1726350AbgH3TPI (ORCPT
        <rfc822;linux-wireless@vger.kernel.org>);
        Sun, 30 Aug 2020 15:15:08 -0400
Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com
 [IPv6:2a00:1450:4864:20::141])
        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E897C061236;
        Sun, 30 Aug 2020 12:15:07 -0700 (PDT)
Received: by mail-lf1-x141.google.com with SMTP id j15so2315573lfg.7;
        Sun, 30 Aug 2020 12:15:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references
         :mime-version:content-transfer-encoding;
        bh=85fBH067dHvKQNq6ek+W6lpUInMb+ZStwZLTCqTuQ3g=;
        b=nVMf6eR/tzJR9bU6YV5ktJWXhIRVVdwtYx5dR5sOF9HNUZJR1lw0R2eZ5yKGcbs3Ij
         UCrio8mvGQhynAaPTXjMhm57mDu723ApUr0TiZXjmUoJrFQVIFl6VYZeCDu3dXXFGUw0
         XasSLQZ6ak9UxEk4Xen3Q2U/Zr/P+/jB0QY1vR+MRsiIFzZXwQRQpM9IJzj4yIYopB5X
         9XhWNhf2QWh9gH61eTumnKsNzptLg/c8atZt15ncup5uu1C2f/rwt/4dav6jO2dmbGAs
         p9NeFTAyGXpQxrzCtfDUCTXvmsS6UEY3o15iWQaZopVbo0ypnts/6Vg8upR1VNQVxnM7
         E7Zw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references:mime-version:content-transfer-encoding;
        bh=85fBH067dHvKQNq6ek+W6lpUInMb+ZStwZLTCqTuQ3g=;
        b=WwmOJDBXyk7Su9lj9yFvo0X22q549x/nNNUuUYCmUf8OjvUL6LwAkcQ7l+F6X41BtP
         n1fYqGH6S7w68U3pIL2yyzR7YOl1NDYvZp3LRNGc6Y0dljwZbMMrbTXkdnimwrVneXLQ
         CLjOSIYQkJgtWX9ZG/Uaq+hnaY7BX9EMntr7mXYbD+O8Xmr8/Zb/jUJSKiKIxAVW48JM
         z2B7XRLEfmd8ELQoMhqtCw/23wbQ6tnT5tdtt+ngDJWh7aXnUaVgO8i/tQf0Th3JXBdj
         dB5/P8FDMKrLNwxVYaaHyo/vs86AeUzj+J7Vu+jSQYbWobKSsN0h9FsVwsoEzud1cPlw
         s9Tg==
X-Gm-Message-State: AOAM531EgBgv8kHi8OlvBWwXAThNCUT/1OO1iu8iU00rAeqI5Tb40pod
        ZyIrbVjNZJe6MgLKqLMeZrw=
X-Google-Smtp-Source: 
 ABdhPJzI4lUuYNLpOO2XLO2AmkS9fShcfxSPyVOk6XVuyEYlvT5tmtBLoLVIApzOMF3Luuy0a5TW7Q==
X-Received: by 2002:ac2:5e2c:: with SMTP id o12mr3918764lfg.71.1598814905875;
        Sun, 30 Aug 2020 12:15:05 -0700 (PDT)
Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru.
 [109.252.170.211])
        by smtp.gmail.com with ESMTPSA id
 e23sm1409709lfj.80.2020.08.30.12.15.04
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 30 Aug 2020 12:15:05 -0700 (PDT)
From: Dmitry Osipenko <digetx@gmail.com>
To: Arend van Spriel <arend.vanspriel@broadcom.com>,
        Franky Lin <franky.lin@broadcom.com>,
        Hante Meuleman <hante.meuleman@broadcom.com>,
        Chi-Hsien Lin <chi-hsien.lin@cypress.com>,
        Wright Feng <wright.feng@cypress.com>,
        Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org,
        brcm80211-dev-list.pdl@broadcom.com,
        brcm80211-dev-list@cypress.com, netdev@vger.kernel.org,
        linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 2/3] brcmfmac: drop chip id from debug messages
Date: Sun, 30 Aug 2020 22:14:38 +0300
Message-Id: <20200830191439.10017-3-digetx@gmail.com>
X-Mailer: git-send-email 2.27.0
In-Reply-To: <20200830191439.10017-1-digetx@gmail.com>
References: <20200830191439.10017-1-digetx@gmail.com>
MIME-Version: 1.0
Sender: linux-wireless-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-wireless.vger.kernel.org>
X-Mailing-List: linux-wireless@vger.kernel.org

The chip ID was already printed out at the time when debug message about
the changed F2 watermark is printed, hence let's drop the unnecessary part
of the debug messages. This cleans code a tad and also allows to re-use
the F2 watermark debug messages by multiple chips.

Suggested-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index b16944a898f9..d4989e0cd7be 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -4280,7 +4280,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,
 			break;
 		case SDIO_DEVICE_ID_BROADCOM_4329:
 		case SDIO_DEVICE_ID_BROADCOM_4339:
-			brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes for 4339\n",
+			brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n",
 				  CY_4339_F2_WATERMARK);
 			brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK,
 					   CY_4339_F2_WATERMARK, &err);
@@ -4293,7 +4293,7 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err,
 					   CY_4339_MESBUSYCTRL, &err);
 			break;
 		case SDIO_DEVICE_ID_BROADCOM_43455:
-			brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes for 43455\n",
+			brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n",
 				  CY_43455_F2_WATERMARK);
 			brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK,
 					   CY_43455_F2_WATERMARK, &err);

From patchwork Sun Aug 30 19:14:39 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Dmitry Osipenko <digetx@gmail.com>
X-Patchwork-Id: 11745291
X-Patchwork-Delegate: kvalo@adurom.com
Return-Path: <SRS0=8jSp=CI=vger.kernel.org=linux-wireless-owner@kernel.org>
Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org
 [172.30.200.123])
	by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC61D722
	for <patchwork-linux-wireless@patchwork.kernel.org>;
 Sun, 30 Aug 2020 19:18:14 +0000 (UTC)
Received: from vger.kernel.org (vger.kernel.org [23.128.96.18])
	by mail.kernel.org (Postfix) with ESMTP id A440D20757
	for <patchwork-linux-wireless@patchwork.kernel.org>;
 Sun, 30 Aug 2020 19:18:14 +0000 (UTC)
Authentication-Results: mail.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
 header.b="ADD6Kq4a"
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
        id S1727902AbgH3TRq (ORCPT
        <rfc822;patchwork-linux-wireless@patchwork.kernel.org>);
        Sun, 30 Aug 2020 15:17:46 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36392 "EHLO
        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
        with ESMTP id S1726380AbgH3TPJ (ORCPT
        <rfc822;linux-wireless@vger.kernel.org>);
        Sun, 30 Aug 2020 15:15:09 -0400
Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com
 [IPv6:2a00:1450:4864:20::142])
        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6439FC061239;
        Sun, 30 Aug 2020 12:15:08 -0700 (PDT)
Received: by mail-lf1-x142.google.com with SMTP id j15so2315593lfg.7;
        Sun, 30 Aug 2020 12:15:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references
         :mime-version:content-transfer-encoding;
        bh=WKk6KWPNkMHUCww/FbErLxUYYQtEUh3n/PTtmJB/IIQ=;
        b=ADD6Kq4arZJOO7Z+X6dlbNFUKa2MGhu79OcOljRz3WAcc/N3H23SdadMXUusZl7Re7
         mavcADGOOGjw4YPLh4Bd3AHe3Wf3GrR9xszVDjKeNWBVzpgfPFpbu+G5v/ZCc1IocLez
         Tml2HhWF++QwC8/gg0QSMJMYiVTHYrz7Mfq31KkwcMzdX/uXIwpZBuRtIx3Vf6OfTE4I
         gSfTcZ6mcSbFla2yJur9lviMamt/2uiHZG0/UTLDqfDQ0fXciUFWXW/wU1YYVwLxynkp
         32H0oWWSihfW4LFt7gufNGgSOCh6YMorVxHCY3+a2JagEhMaXuLn853leokAN8VD3nsO
         IjnQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references:mime-version:content-transfer-encoding;
        bh=WKk6KWPNkMHUCww/FbErLxUYYQtEUh3n/PTtmJB/IIQ=;
        b=P70ZXffe7IiriynRgLFOrgujg3zCp+qiQV2DtraBUnPXzHbxNDRH7MnRX8RyYwJZs7
         MDwZwyOsryxbtpv/1lQfakB0pFKDzMAqpRhxIc4amXyIBz2g4uoZIDStNSODVhXtjG5H
         h4uPuSz9neHI7vO4/7Yp1kvBCS29fbXLIKIFGR4QrwqWxGuaMhNyeXs2Eb3K/jkyfDjn
         1HVDqw+yW5WX2R5Rq7xkjw05AMrqSVvecbX+WV/ksoCgYd3N9bS52B0rBA3Qd6uOADTj
         82vYn1zNANhjSnTRMC0hOTZmzmnqZsyksYdQrpbyEsdpHaKbB6GkX7ylp3TM9XDpD9xK
         +ROQ==
X-Gm-Message-State: AOAM532osjv7Nw1P0/HRBwzPySBJZh+vqXrZj/Ko6Yzt0eyt2qeOFDG3
        JOT89QLhVftNg53aBYKa2p4=
X-Google-Smtp-Source: 
 ABdhPJzL0Cdo7AKGH5FiC2AREv1bSdtUCg+BEl1uu43NLTd1wRmGMfv3vj1BvcduUPeX7jN48VJ+7Q==
X-Received: by 2002:ac2:41cc:: with SMTP id d12mr4018561lfi.20.1598814906867;
        Sun, 30 Aug 2020 12:15:06 -0700 (PDT)
Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru.
 [109.252.170.211])
        by smtp.gmail.com with ESMTPSA id
 e23sm1409709lfj.80.2020.08.30.12.15.05
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 30 Aug 2020 12:15:06 -0700 (PDT)
From: Dmitry Osipenko <digetx@gmail.com>
To: Arend van Spriel <arend.vanspriel@broadcom.com>,
        Franky Lin <franky.lin@broadcom.com>,
        Hante Meuleman <hante.meuleman@broadcom.com>,
        Chi-Hsien Lin <chi-hsien.lin@cypress.com>,
        Wright Feng <wright.feng@cypress.com>,
        Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org,
        brcm80211-dev-list.pdl@broadcom.com,
        brcm80211-dev-list@cypress.com, netdev@vger.kernel.org,
        linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 3/3] brcmfmac: set F2 SDIO block size to 128 bytes for
 BCM4329
Date: Sun, 30 Aug 2020 22:14:39 +0300
Message-Id: <20200830191439.10017-4-digetx@gmail.com>
X-Mailer: git-send-email 2.27.0
In-Reply-To: <20200830191439.10017-1-digetx@gmail.com>
References: <20200830191439.10017-1-digetx@gmail.com>
MIME-Version: 1.0
Sender: linux-wireless-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-wireless.vger.kernel.org>
X-Mailing-List: linux-wireless@vger.kernel.org

Setting F2 block size to 128 bytes for BCM4329 allows to significantly
improve RX throughput on NVIDIA Tegra20. Before this change the throughput
was capped to 30 Mbit/s on Tegra, now throughput is at 40 Mbit/s, which is
a maximum throughput for the BCM4329 chip. The F2 block size is borrowed
from the downstream BCMDHD driver. The comment in the BCMDHD driver says
that 128B improves throughput and turns out that it works for the brcmfmac
as well.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
index 0dc4de2fa9f6..318bd00bf94f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
@@ -45,6 +45,7 @@
 #define SDIO_FUNC2_BLOCKSIZE		512
 #define SDIO_4373_FUNC2_BLOCKSIZE	256
 #define SDIO_435X_FUNC2_BLOCKSIZE	256
+#define SDIO_4329_FUNC2_BLOCKSIZE	128
 /* Maximum milliseconds to wait for F2 to come up */
 #define SDIO_WAIT_F2RDY	3000
 
@@ -920,6 +921,9 @@ int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev)
 	case SDIO_DEVICE_ID_BROADCOM_4356:
 		f2_blksz = SDIO_435X_FUNC2_BLOCKSIZE;
 		break;
+	case SDIO_DEVICE_ID_BROADCOM_4329:
+		f2_blksz = SDIO_4329_FUNC2_BLOCKSIZE;
+		break;
 	default:
 		break;
 	}