linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] brcmfmac: sdio: Deal better w/ transmission errors related to idle
@ 2019-06-13 23:41 Douglas Anderson
  2019-06-13 23:41 ` [PATCH v4 1/5] Revert "brcmfmac: disable command decode in sdio_aos" Douglas Anderson
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Douglas Anderson @ 2019-06-13 23:41 UTC (permalink / raw)
  To: Ulf Hansson, Kalle Valo, Adrian Hunter, Arend van Spriel
  Cc: brcm80211-dev-list.pdl, linux-rockchip, Double Lo, briannorris,
	linux-wireless, Naveen Gupta, Madhan Mohan R, mka, Wright Feng,
	Chi-Hsien Lin, netdev, brcm80211-dev-list, Douglas Anderson,
	Shawn Lin, YueHaibing, Allison Randal, Thomas Gleixner,
	Hans de Goede, Hante Meuleman, Greg Kroah-Hartman,
	Ritesh Harjani, Wolfram Sang, Franky Lin, Ondrej Jirman,
	Jiong Wu, David S. Miller, linux-mmc, linux-kernel,
	Madhan Mohan R, Avri Altman

This series attempts to deal better with the expected transmission
errors related to the idle states (handled by the Always-On-Subsystem
or AOS) on the SDIO-based WiFi on rk3288-veyron-minnie,
rk3288-veyron-speedy, and rk3288-veyron-mickey.

Some details about those errors can be found in
<https://crbug.com/960222>, but to summarize it here: if we try to
send the wakeup command to the WiFi card at the same time it has
decided to wake up itself then it will behave badly on the SDIO bus.
This can cause timeouts or CRC errors.

When I tested on 4.19 and 4.20 these CRC errors can be seen to cause
re-tuning.  Since I am currently developing on 4.19 this was the
original problem I attempted to solve.

On mainline it turns out that you don't see the retuning errors but
you see tons of spam about timeouts trying to wakeup from sleep.  I
tracked down the commit that was causing that and have partially
reverted it here.  I have no real knowledge about Broadcom WiFi, but
the commit that was causing problems sounds (from the descriptioin) to
be a hack commit penalizing all Broadcom WiFi users because of a bug
in a Cypress SD controller.  I will let others comment if this is
truly the case and, if so, what the right solution should be.

For v3 of this series I have added 2 patches to the end of the series
to address errors that would show up on systems with these same SDIO
WiFi cards when used on controllers that do periodic retuning.  These
systems need an extra fix to prevent the retuning from happening when
the card is asleep.

Changes in v4:
- Moved to SDIO API only (Adrian, Ulf).
- Renamed to make it less generic, now retune_crc_disable (Ulf).
- Function header makes it clear host must be claimed (Ulf).
- No more WARN_ON (Ulf).
- Adjust to API rename (Adrian, Ulf).
- Moved retune hold/release to SDIO API (Adrian).
- Adjust to API rename (Adrian).

Changes in v3:
- Took out the spinlock since I believe this is all in one context.
- Expect errors for all of brcmf_sdio_kso_control() (Adrian).
- ("mmc: core: Export mmc_retune_hold_now() mmc_retune_release()") new for v3.
- ("brcmfmac: sdio: Don't tune while the card is off") new for v3.

Changes in v2:
- A full revert, not just a partial one (Arend).  ...with explicit Cc.
- Updated commit message to clarify based on discussion of v1.

Douglas Anderson (5):
  Revert "brcmfmac: disable command decode in sdio_aos"
  mmc: core: API to temporarily disable retuning for SDIO CRC errors
  brcmfmac: sdio: Disable auto-tuning around commands expected to fail
  mmc: core: Add sdio_retune_hold_now() and sdio_retune_release()
  brcmfmac: sdio: Don't tune while the card is off

 drivers/mmc/core/core.c                       |  5 +-
 drivers/mmc/core/sdio_io.c                    | 76 +++++++++++++++++++
 .../broadcom/brcm80211/brcmfmac/sdio.c        | 17 +++--
 include/linux/mmc/core.h                      |  2 +
 include/linux/mmc/host.h                      |  1 +
 include/linux/mmc/sdio_func.h                 |  6 ++
 6 files changed, 100 insertions(+), 7 deletions(-)

-- 
2.22.0.rc2.383.gf4fbbf30c2-goog


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-06-17 10:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 23:41 [PATCH v4 0/5] brcmfmac: sdio: Deal better w/ transmission errors related to idle Douglas Anderson
2019-06-13 23:41 ` [PATCH v4 1/5] Revert "brcmfmac: disable command decode in sdio_aos" Douglas Anderson
2019-06-13 23:41 ` [PATCH v4 2/5] mmc: core: API to temporarily disable retuning for SDIO CRC errors Douglas Anderson
2019-06-14 12:04   ` Ulf Hansson
2019-06-14 16:41     ` Doug Anderson
2019-06-17  7:53       ` Ulf Hansson
2019-06-17  8:30   ` Adrian Hunter
2019-06-13 23:41 ` [PATCH v4 3/5] brcmfmac: sdio: Disable auto-tuning around commands expected to fail Douglas Anderson
2019-06-17  8:33   ` Adrian Hunter
2019-06-17 10:35   ` Arend Van Spriel
2019-06-13 23:41 ` [PATCH v4 4/5] mmc: core: Add sdio_retune_hold_now() and sdio_retune_release() Douglas Anderson
2019-06-14 12:09   ` Ulf Hansson
2019-06-14 16:38     ` Doug Anderson
2019-06-14 17:17       ` Arend Van Spriel
2019-06-17  8:46       ` Adrian Hunter
2019-06-17  8:34   ` Adrian Hunter
2019-06-13 23:41 ` [PATCH v4 5/5] brcmfmac: sdio: Don't tune while the card is off Douglas Anderson
2019-06-17  8:28   ` Adrian Hunter
2019-06-17 10:52   ` Arend Van Spriel

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).