linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 0/3] Fixes and improvements for brcmfmac driver
Date: Sun, 30 Aug 2020 22:14:36 +0300	[thread overview]
Message-ID: <20200830191439.10017-1-digetx@gmail.com> (raw)

Hello!

Recently I was debugging WiFi performance problems on Acer A500 tablet
device that got upstreamed recently. This is an older Android device from
2011-2012 that is powered by NVIDIA Tegra20 SoC and it has BCM4329 chip
that provides WiFi (SDIO) and Bluetooth (UART). I noticed that WiFi
throughput on a recent Linux kernel wasn't as great as it could be in
comparison to older 3.18 kernel that is uses downstream BCMDHD driver
and this series fixes a major part of the problems that I found.

Found problems:

1. The WiFi SDIO pinmux configuration had a bug in Acer A500 device-tree
   and MMC refused to work if it was clocked above 25MHz and legacy
   signaling mode was used. After fixing the bug, WiFi SDIO works perfectly
   well at 50MHz and this increases TX throughput by 5-10 Mbit/s. I already
   sent out patches that fix this bug to the Tegra ML.

2. There are occasional SDHCI CRC errors if SDIO is clocked above 25Mhz.
   The "increase F2 watermark" patch fixes this problem.

3. WiFi TX throughput is lower by 10 Mbit/s than it should be using 512B
   for maximum F2 SDIO block size. Reducing block size to 128B fixes this
   problem. The "set F2 SDIO block size to 128 bytes" patch addresses this
   issue. The exact reason why 128B is more efficient than 512B is unknown,
   this optimization is borrowed from the BCMDHD driver.

4. While I was bisecting upstream kernel, I found that WiFi RX/TX throughput
   dropped by 5-10 Mbit/s after 5.2 kernel and reverting the following commit
   from linux-next resolves the problem:

   commit c07a48c2651965e84d35cf193dfc0e5f7892d612
   Author: Adrian Hunter <adrian.hunter@intel.com>
   Date:   Fri Apr 5 15:40:20 2019 +0300

       mmc: sdhci: Remove finish_tasklet

   I'll sent a separate email for discussing this problem [1].

   [1] https://lkml.org/lkml/2020/8/27/54

After fixing all the above problems, I'm now getting a solid 40 Mbit/s
up/down on Acer A500 on a recent linux-next in comparison to 15 Mbit/s
that I was getting before the fixes.

Big thanks to Wright Feng who helped me to find and fix some of the problems!

Changelog:

v3: - The v2 "drop unnecessary "fallthrough" comments" patch isn't needed
      anymore because that change is already applied.

    - Added r-b from Arend van Spriel that he gave to the v1 of "increase F2
      watermark for BCM4329" patch.

v2: - Added "drop chip id from debug messages" as was requested by
      Arend Van Spriel in the review comment to v1 of the "increase F2
      watermark" patch.

    - Added patches that remove unnecessary "fallthrough" comments and
      change F2 SDIO block size to 128 bytes for BCM4329.

Dmitry Osipenko (3):
  brcmfmac: increase F2 watermark for BCM4329
  brcmfmac: drop chip id from debug messages
  brcmfmac: set F2 SDIO block size to 128 bytes for BCM4329

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 ++++
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c   | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)

-- 
2.27.0


             reply	other threads:[~2020-08-30 19:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-30 19:14 Dmitry Osipenko [this message]
2020-08-30 19:14 ` [PATCH v3 1/3] brcmfmac: increase F2 watermark for BCM4329 Dmitry Osipenko
2020-09-07  8:52   ` Kalle Valo
2020-08-30 19:14 ` [PATCH v3 2/3] brcmfmac: drop chip id from debug messages Dmitry Osipenko
2020-08-30 19:14 ` [PATCH v3 3/3] brcmfmac: set F2 SDIO block size to 128 bytes for BCM4329 Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200830191439.10017-1-digetx@gmail.com \
    --to=digetx@gmail.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=chi-hsien.lin@cypress.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wright.feng@cypress.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).