linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Daniel Mack <daniel@zonque.org>
Cc: linux-wireless@vger.kernel.org, wcn36xx@lists.infradead.org,
	rfried@codeaurora.org, bjorn.andersson@linaro.org,
	nicolas.dechesne@linaro.org, loic.poulain@linaro.org,
	Daniel Mack <daniel@zonque.org>
Subject: Re: [01/10] wcn36xx: fix buffer commit logic on TX path
Date: Fri, 25 May 2018 10:08:58 +0000 (UTC)	[thread overview]
Message-ID: <20180525100858.6251560618@smtp.codeaurora.org> (raw)
In-Reply-To: <20180516140820.1636-2-daniel@zonque.org>

Daniel Mack <daniel@zonque.org> wrote:

> When wcn36xx_dxe_tx_frame() is entered while the device is still processing
> the queue asyncronously, we are racing against the firmware code with
> updates to the buffer descriptors. Presumably, the firmware scans the ring
> buffer that holds the descriptors and scans for a valid control descriptor,
> and then assumes that the next descriptor contains the payload. If, however,
> the control descriptor is marked valid, but the payload descriptor isn't,
> the packet is not sent out.
> 
> Another issue with the current code is that is lacks memory barriers before
> descriptors are marked valid. This is important because the CPU may reorder
> writes to memory, even if it is allocated as coherent DMA area, and hence
> the device may see incompletely written data.
> 
> To fix this, the code in wcn36xx_dxe_tx_frame() was restructured a bit so
> that the payload descriptor is made valid before the control descriptor.
> Memory barriers are added to ensure coherency of shared memory areas.
> 
> Signed-off-by: Daniel Mack <daniel@zonque.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

10 patches applied to ath-next branch of ath.git, thanks.

9a81cc23dfef wcn36xx: fix buffer commit logic on TX path
57e06e0e2a86 wcn36xx: set DMA mask explicitly
ba437e72378c wcn36xx: don't disable RX IRQ from handler
edd23ab403cf wcn36xx: clear all masks in RX interrupt
ce1d4be82b10 wcn36xx: only handle packets when ED or DONE bit is set
18c7ed138824 wcn36xx: consider CTRL_EOP bit when looking for valid descriptors
2a46c829a926 wcn36xx: set PREASSOC and IDLE stated when BSS info changes
773f9a28bcda wcn36xx: drain pending indicator messages on shutdown
a50c6c8412f7 wcn36xx: simplify wcn36xx_smd_open()
ffbc9197b472 wcn36xx: improve debug and error messages for SMD

-- 
https://patchwork.kernel.org/patch/10404031/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  parent reply	other threads:[~2018-05-25 10:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 14:08 [PATCH 00/10] Some more patches for wcn36xx Daniel Mack
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   ` Kalle Valo [this message]
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=20180525100858.6251560618@smtp.codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@zonque.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 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).