All of lore.kernel.org
 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 15:56:19 +0200	[thread overview]
Message-ID: <20130505155619.1f316a6b@milhouse> (raw)
In-Reply-To: <CACna6rxWPOqQPNUaASaj=v=O+Wjt0okjX4jNwE3tv-=etfATCg@mail.gmail.com>

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

> 2013/4/23 Thommy Jakobsson <thommyj@gmail.com>:
> > Add handling of rx descriptor underflow. This fixes a fault that could
> > happen on slow machines, where data is received faster than the CPU can
> > handle. In such a case the device will use up all rx descriptors and
> > refuse to send any more data before confirming that it is ok. This
> > patch enables necessary interrupt to discover such a situation and will
> > handle them by dropping everything in the ring buffer.
> 
> Thommy: does it mean firmware actually ignores what we write to the
> B43_DMA64_RXINDEX (recently renamed to the B43_DMA64_RXSTOPINDEX)? Is
> our set_current_rxslot and op64_set_current_rxslot (same for 32bit
> version) useless in this situation?
> 
> Could this be a off-by-one issue? Maybe we're writing a value too low
> by a one and firmware believes the whole ring is empty while it's
> full?

The ring looks the same if it's full or empty. We can only know that it is
full when this interrupt fires, which happens as the indexes collide.

-- 
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/e97d652f/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
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: Re: [PATCH] B43: Handle DMA RX descriptor underrun
Date: Sun, 5 May 2013 15:56:19 +0200	[thread overview]
Message-ID: <20130505155619.1f316a6b@milhouse> (raw)
In-Reply-To: <CACna6rxWPOqQPNUaASaj=v=O+Wjt0okjX4jNwE3tv-=etfATCg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

On Sun, 5 May 2013 14:44:14 +0200
Rafał Miłecki <zajec5@gmail.com> wrote:

> 2013/4/23 Thommy Jakobsson <thommyj@gmail.com>:
> > Add handling of rx descriptor underflow. This fixes a fault that could
> > happen on slow machines, where data is received faster than the CPU can
> > handle. In such a case the device will use up all rx descriptors and
> > refuse to send any more data before confirming that it is ok. This
> > patch enables necessary interrupt to discover such a situation and will
> > handle them by dropping everything in the ring buffer.
> 
> Thommy: does it mean firmware actually ignores what we write to the
> B43_DMA64_RXINDEX (recently renamed to the B43_DMA64_RXSTOPINDEX)? Is
> our set_current_rxslot and op64_set_current_rxslot (same for 32bit
> version) useless in this situation?
> 
> Could this be a off-by-one issue? Maybe we're writing a value too low
> by a one and firmware believes the whole ring is empty while it's
> full?

The ring looks the same if it's full or empty. We can only know that it is
full when this interrupt fires, which happens as the indexes collide.

-- 
Michael

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-05-05 13:56 UTC|newest]

Thread overview: 52+ 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-23 20:33   ` Michael Büsch
2013-04-24  7:00 ` [PATCH] B43: Handle DMA RX descriptor underrun Rafał Miłecki
2013-04-24  7:00   ` Rafał Miłecki
2013-05-03 17:35   ` John W. Linville
2013-05-03 19:40     ` Thommy Jakobsson
2013-05-03 19:40       ` Thommy Jakobsson
2013-05-02 13:06 ` Michael Büsch
2013-05-02 13:06   ` Michael Büsch
2013-05-02 15:01   ` Larry Finger
2013-05-02 15:01     ` Larry Finger
2013-05-05 12:44 ` Rafał Miłecki
2013-05-05 12:44   ` Rafał Miłecki
2013-05-05 13:56   ` Michael Büsch [this message]
2013-05-05 13:56     ` Michael Büsch
2013-05-05 15:34   ` Rafał Miłecki
2013-05-05 15:34     ` Rafał Miłecki
2013-05-05 19:09     ` Thommy Jakobsson
2013-05-05 19:09       ` Thommy Jakobsson
2013-05-05 15:43   ` Rafał Miłecki
2013-05-05 15:43     ` Rafał Miłecki
2013-05-05 16:31     ` Rafał Miłecki
2013-05-05 16:31       ` Rafał Miłecki
2013-05-05 17:24       ` Michael Büsch
2013-05-05 17:24         ` Michael Büsch
2013-05-05 19:50         ` Rafał Miłecki
2013-05-05 19:50           ` Rafał Miłecki
2013-05-05 19:58           ` Michael Büsch
2013-05-05 19:58             ` Michael Büsch
2013-05-05 20:06             ` Thommy Jakobsson
2013-05-05 20:06               ` Thommy Jakobsson
2013-05-05 19:59           ` Thommy Jakobsson
2013-05-05 19:59             ` Thommy Jakobsson
2013-05-05 19:22     ` Larry Finger
2013-05-05 19:22       ` Larry Finger
2013-05-13 18:27   ` Thommy Jakobsson
2013-05-13 18:27     ` Thommy Jakobsson
2013-05-24 16:49     ` John W. Linville
2013-05-24 16:49       ` John W. Linville
2013-05-25 19:02       ` Thommy Jakobsson
2013-05-25 19:02         ` Thommy Jakobsson
2013-05-25 19:37         ` Hauke Mehrtens
2013-05-25 19:37           ` Hauke Mehrtens
2013-05-25 19:42           ` Michael Büsch
2013-05-25 19:42             ` Michael Büsch
2013-05-25 20:37             ` Larry Finger
2013-05-25 20:37               ` Larry Finger
2013-05-28 17:37               ` John W. Linville
2013-05-28 17:37                 ` John W. Linville
2013-06-10  9:40           ` Rafał Miłecki
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=20130505155619.1f316a6b@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 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.