linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Adrian Chadd <adrian@freebsd.org>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
	mcgrof@qca.qualcomm.com
Subject: Re: [PATCH 5/7] ath9k: fix handling of broken descriptors
Date: Mon, 08 Apr 2013 00:34:30 +0200	[thread overview]
Message-ID: <5161F476.5090304@openwrt.org> (raw)
In-Reply-To: <CAJ-Vmo=6W_C0d_wEeT8UM1+1LXOsi5xHGj=KdKF7E5BNdtLbgQ@mail.gmail.com>

On 2013-04-08 12:24 AM, Adrian Chadd wrote:
> Hm!
> 
> On 7 April 2013 15:04, Felix Fietkau <nbd@openwrt.org> wrote:
>> As the comment in ath_get_next_rx_buf indicates, if a descriptor with
>> the done bit set follows one with the done bit cleared, both descriptors
>> should be discarded, however the driver is not doing that yet.
>>
>> To fix this, use the rs->rs_more flag as an indicator that the following
>> frame should be discarded. This also helps with the split buffer case:
>> if the first part of the frame is discarded, the following parts need to
>> be discarded as well, since they contain no valid header or usable data.
> 
> Have you seen this happen?
> 
> I've added code to this in FreeBSD (based on the reference driver and
> ath9k doing it) and I've never, ever seen it trigger.
> 
> I went digging through the EV database and I found a bug (long since
> fixed) where the code was adjusting the skb size and then pushing it
> back onto the RX queue with an incorrect size. If it allocated a 2kiB
> SKU and then reset the size to 4KiB, hilarity would ensue.
> 
> This is why I'm asking. If it happens in the real world, fine. :-)
I didn't see the done bit related corruption, but I fixed the code so
that I could reuse it for the patch after it (which is based on real
world observations).

- Felix

      reply	other threads:[~2013-04-07 22:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-07 22:04 [PATCH 1/7] ath9k_hw: clean up RF Bank6 handling on AR5416/AR91xx Felix Fietkau
2013-04-07 22:04 ` [PATCH 2/7] ath9k_hw: make various ar5416/ar91xx rf banks const Felix Fietkau
2013-04-07 22:04   ` [PATCH 3/7] ath9k_common: remove ath9k_cmn_padpos Felix Fietkau
2013-04-07 22:04     ` [PATCH 4/7] ath9k: improve dma map failure handling Felix Fietkau
2013-04-07 22:04       ` [PATCH 5/7] ath9k: fix handling of broken descriptors Felix Fietkau
2013-04-07 22:04         ` [PATCH 6/7] ath9k: detect more kinds of invalid descriptors Felix Fietkau
2013-04-07 22:04           ` [PATCH 7/7] ath9k: implement buffer holding handling for EDMA FIFO Felix Fietkau
2013-04-07 22:21             ` Adrian Chadd
2013-04-07 22:24         ` [PATCH 5/7] ath9k: fix handling of broken descriptors Adrian Chadd
2013-04-07 22:34           ` Felix Fietkau [this message]

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=5161F476.5090304@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=adrian@freebsd.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@qca.qualcomm.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).