From: Jeff Garzik <jgarzik@pobox.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Jason Wang <jasowang@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH] 8139cp: set ring address after enabling C+ mode
Date: Wed, 21 Nov 2012 22:47:39 -0500 [thread overview]
Message-ID: <50ADA05B.2000308@pobox.com> (raw)
In-Reply-To: <1353529639.26346.164.camel@shinybook.infradead.org>
On 11/21/2012 03:27 PM, David Woodhouse wrote:
> This fixes (for me) a regression introduced by commit b01af457 ("8139cp:
> set ring address before enabling receiver"). That commit configured the
> descriptor ring addresses earlier in the initialisation sequence, in
> order to avoid the possibility of triggering stray DMA before the
> correct address had been set up.
>
> Unfortunately, it seems that the hardware will scribble garbage into the
> TxRingAddr registers when we enable "plus mode" Tx in the CpCmd
> register. Observed on a Traverse Geos router board.
>
> To deal with this, while not reintroducing the problem which led to the
> original commit, we augment cp_start_hw() to write to the CpCmd register
> *first*, then set the descriptor ring addresses, and then finally to
> enable Rx and Tx in the original 8139 Cmd register. The datasheet
> actually indicates that we should enable Tx/Rx in the Cmd register
> *before* configuring the descriptor addresses, but that would appear to
> re-introduce the problem that the offending commit b01af457 was trying
> to solve. And this variant appears to work fine on real hardware.
>
> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
> Cc: stable@kernel.org [3.5+]
>
> ---
> How about this? I'm still somewhat confused about when it actually
> *does* start doing DMA, given what the datasheet says.
Well, we have three logical code states:
State A: pre-b01af457, known working
State B: b01af457, known broken
State C: dwmw2 proposed fix, tested on 1 hardware, new technique, query
open with Realtek
State A seems safer for late -rc, which is where we are. Fix the
regression by reverting to well-tested, widely deployed state.
Then apply your patch here as an immediate candidate for net-next.
Jeff
next prev parent reply other threads:[~2012-11-22 19:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120602235020.2C0A57C006C@ra.kernel.org>
2012-11-21 16:57 ` 8139cp: set ring address before enabling receiver David Woodhouse
2012-11-21 18:12 ` Jeff Garzik
2012-11-21 19:51 ` David Woodhouse
2012-11-21 20:18 ` Ben Hutchings
2012-11-21 20:40 ` Jeff Garzik
2012-11-21 21:00 ` David Woodhouse
2012-11-21 21:10 ` Ben Hutchings
2012-11-21 20:27 ` [PATCH] 8139cp: set ring address after enabling C+ mode David Woodhouse
2012-11-21 20:40 ` Francois Romieu
2012-11-21 22:32 ` David Woodhouse
2012-11-21 22:40 ` David Miller
2012-11-21 22:52 ` David Woodhouse
2012-11-21 23:12 ` David Miller
2012-11-22 3:47 ` Jeff Garzik [this message]
2012-11-22 4:39 ` David Miller
2012-11-22 4:53 ` Jeff Garzik
2012-11-22 5:30 ` Jason Wang
2012-11-22 21:39 ` Francois Romieu
2012-11-22 23:12 ` David Woodhouse
2012-11-23 12:37 ` Gilboa Davara
2012-11-23 3:53 ` Jason Wang
2012-11-25 20:54 ` David Miller
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=50ADA05B.2000308@pobox.com \
--to=jgarzik@pobox.com \
--cc=davem@davemloft.net \
--cc=dwmw2@infradead.org \
--cc=jasowang@redhat.com \
--cc=netdev@vger.kernel.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.