All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque.org>
To: linux-wireless@vger.kernel.org
Cc: wcn36xx@lists.infradead.org, kvalo@codeaurora.org,
	rfried@codeaurora.org, bjorn.andersson@linaro.org,
	nicolas.dechesne@linaro.org, loic.poulain@linaro.org,
	Daniel Mack <daniel@zonque.org>
Subject: [PATCH 00/10] Some more patches for wcn36xx
Date: Wed, 16 May 2018 16:08:10 +0200	[thread overview]
Message-ID: <20180516140820.1636-1-daniel@zonque.org> (raw)

Here are some more patches for the wcn36xx driver that emerged from
reviews and my attempts to fix the connection timeout issues. Some of
them merely bring the driver in sync with what the "prima" downstream
driver is doing, and they seemingly make the driver more stable.
Others just apply some best practice patterns or do some cleanup.

The first patch in the series is one that I've sent earlier as RFC, and
Loic expressed his support in a follow-up. I still believe it does the
right thing.

However, the connection timeout problems are still there unfortunately,
but they seemingly appear to happen less often now.

To recap, when the driver gets stuck, not a single packet is being sent
out anymore. I have a 2nd machine tuned to the same channel to capture
all packets from the MAC of the device under test, and it shows a flat
line once the connection timeouts happen. Some more context is given in
this bug report:

  https://bugs.96boards.org/show_bug.cgi?id=538

One interesting find is that setting the debug_mask module parameter to
0x4 or 0x400 (or both), the issue is much less likely to happen. All
this does is adding printk()s before each message is sent out, and that
affects the timings of course. I tried adding mdelay() there instead,
and they too make the effect less likely, but they don't make it go
away.

Hence I believe that some sort of firmware internal buffer is overrun if
too many SMD requests fly in in a short amount of time. The firmware
does, however, still ack all packets just fine on the SMD channels, and
also the DXE communication flows are all healthy. No errors are reported
anywhere, but nothing is being put on the ether anymore.

I'm running out of ideas at this point. I guess without access to the
firmware sources, it's virtually impossible to grok what's going on and
how to work around whatever is causing it.

If anyone has an idea on how to debug this frustrating issue any further,
please let me know. A reproducer is described in the bug reported linked
to above.


Thanks,
Daniel


Daniel Mack (10):
  wcn36xx: fix buffer commit logic on TX path
  wcn36xx: set DMA mask explicitly
  wcn36xx: don't disable RX IRQ from handler
  wcn36xx: clear all masks in RX interrupt
  wcn36xx: only handle packets when ED or DONE bit is set
  wcn36xx: consider CTRL_EOP bit when looking for valid descriptors
  wcn36xx: set PREASSOC and IDLE stated when BSS info changes
  wcn36xx: drain pending indicator messages on shutdown
  wcn36xx: simplify wcn36xx_smd_open()
  wcn36xx: improve debug and error messages for SMD

 drivers/net/wireless/ath/wcn36xx/dxe.c  | 176 ++++++++++++++++++++------------
 drivers/net/wireless/ath/wcn36xx/main.c |  10 ++
 drivers/net/wireless/ath/wcn36xx/smd.c  |  32 +++---
 3 files changed, 137 insertions(+), 81 deletions(-)

-- 
2.14.3

             reply	other threads:[~2018-05-16 14:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 14:08 Daniel Mack [this message]
2018-05-16 14:08 ` [PATCH 01/10] wcn36xx: fix buffer commit logic on TX path Daniel Mack
2018-05-17  9:03   ` Ramon Fried
2018-05-25 10:08   ` [01/10] " Kalle Valo
2018-05-16 14:08 ` [PATCH 02/10] wcn36xx: set DMA mask explicitly Daniel Mack
2018-05-17  9:04   ` Ramon Fried
2018-05-16 14:08 ` [PATCH 03/10] wcn36xx: don't disable RX IRQ from handler Daniel Mack
2018-05-16 14:08 ` [PATCH 04/10] wcn36xx: clear all masks in RX interrupt Daniel Mack
2018-05-16 14:08 ` [PATCH 05/10] wcn36xx: only handle packets when ED or DONE bit is set Daniel Mack
2018-05-16 14:08 ` [PATCH 06/10] wcn36xx: consider CTRL_EOP bit when looking for valid descriptors Daniel Mack
2018-05-16 14:08 ` [PATCH 07/10] wcn36xx: set PREASSOC and IDLE stated when BSS info changes Daniel Mack
2018-05-16 14:08 ` [PATCH 08/10] wcn36xx: drain pending indicator messages on shutdown Daniel Mack
2018-05-16 14:08 ` [PATCH 09/10] wcn36xx: simplify wcn36xx_smd_open() Daniel Mack
2018-05-16 14:08 ` [PATCH 10/10] wcn36xx: improve debug and error messages for SMD Daniel Mack
2018-05-18 10:50 ` [PATCH 00/10] Some more patches for wcn36xx Daniel Mack
2018-05-18 11:28   ` Kalle Valo
2018-05-23 10:05     ` Daniel Mack
2018-05-24  8:44       ` Kalle Valo
2018-05-24  9:40         ` Daniel Mack
2018-05-24 11:48           ` wcn36xx: bug #538: stuck tx management frames Kalle Valo
2018-05-24 12:13             ` Daniel Mack
2018-05-24 12:39               ` Kalle Valo
2018-05-24 17:53                 ` Ramon Fried

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=20180516140820.1636-1-daniel@zonque.org \
    --to=daniel@zonque.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=nicolas.dechesne@linaro.org \
    --cc=rfried@codeaurora.org \
    --cc=wcn36xx@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.