b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Büsch" <m@bues.ch>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Thommy Jakobsson <thommyj@gmail.com>,
	linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	b43-dev@lists.infradead.org, piotras@gmail.com,
	Larry.Finger@lwfinger.net
Subject: [PATCH] B43: Handle DMA RX descriptor underrun
Date: Sun, 5 May 2013 21:58:00 +0200	[thread overview]
Message-ID: <20130505215800.65ae7aea@milhouse> (raw)
In-Reply-To: <CACna6rz+PsN1GyniJL7JZJmb7T6Fnk_g101M8DeePr29LsAXaA@mail.gmail.com>

On Sun, 5 May 2013 21:50:33 +0200
Rafa? Mi?ecki <zajec5@gmail.com> wrote:

> 2013/5/5 Michael B?sch <m@bues.ch>:
> > On Sun, 5 May 2013 18:31:20 +0200
> > Rafa? Mi?ecki <zajec5@gmail.com> wrote:
> >
> >> Still worth considering is my previous e-mail. Why writing (for
> >> example) 1 to RXSTOPINDEX doesn't stop firmware from using slot 1?
> >
> > What makes you think this register does not work?
> 
> Take a look at this:
> 
> [  327.224976] [DBG] old current:5      new current:6
> [  327.224982] [DBG] reading slot 5
> [  327.224997] [DBG] writing stop slot 6
> 
> In above ring->slot was 5, but IRQ was generated, and we read new
> "current" using get_current_rxslot. It appeared to be 6. So we read
> packet from slot 5 and then called
> ops->set_current_rxslot(ring, 6);
> AFAIU hardware shouldn't use slot 6, right? But take a look at what
> happens next:
> 
> [  327.319582] [DBG] old current:6      new current:7
> [  327.319590] [DBG] reading slot 6
> [  327.319619] [DBG] writing stop slot 7
> 
> Hardware generated IRQ and we get_current_rxslot returned 7. It means
> we're allowed to read slots up to 7 (excluding). It other words it
> means firmware used slot 6... but 100ms earlier we forbid firmware to
> use slot 6!

I'd rather say that this is a race condition between your testing code
and the firmware.

-- 
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20130505/c7734559/attachment-0001.sig>

  reply	other threads:[~2013-05-05 19:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23 19:45 [PATCH] B43: Handle DMA RX descriptor underrun Thommy Jakobsson
2013-04-23 20:33 ` [PATCH] b43: rename stop-index DMA op Michael Büsch
2013-04-24  7:00 ` [PATCH] B43: Handle DMA RX descriptor underrun Rafał Miłecki
     [not found]   ` <20130503173537.GK2069@tuxdriver.com>
2013-05-03 19:40     ` Thommy Jakobsson
2013-05-02 13:06 ` Michael Büsch
2013-05-02 15:01   ` Larry Finger
2013-05-05 12:44 ` Rafał Miłecki
2013-05-05 13:56   ` Michael Büsch
2013-05-05 15:34   ` Rafał Miłecki
2013-05-05 19:09     ` Thommy Jakobsson
2013-05-05 15:43   ` Rafał Miłecki
2013-05-05 16:31     ` Rafał Miłecki
2013-05-05 17:24       ` Michael Büsch
2013-05-05 19:50         ` Rafał Miłecki
2013-05-05 19:58           ` Michael Büsch [this message]
2013-05-05 20:06             ` Thommy Jakobsson
2013-05-05 19:59           ` Thommy Jakobsson
2013-05-05 19:22     ` Larry Finger
2013-05-13 18:27   ` Thommy Jakobsson
2013-05-24 16:49     ` John W. Linville
2013-05-25 19:02       ` Thommy Jakobsson
2013-05-25 19:37         ` Hauke Mehrtens
2013-05-25 19:42           ` Michael Büsch
2013-05-25 20:37             ` Larry Finger
2013-05-28 17:37               ` John W. Linville
2013-06-10  9:40           ` Rafał Miłecki

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=20130505215800.65ae7aea@milhouse \
    --to=m@bues.ch \
    --cc=Larry.Finger@lwfinger.net \
    --cc=b43-dev@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=piotras@gmail.com \
    --cc=thommyj@gmail.com \
    --cc=zajec5@gmail.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).