netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Jason Wang <jasowang@redhat.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Jeff Garzik <jgarzik@pobox.com>
Subject: Re: 8139cp: set ring address before enabling receiver
Date: Wed, 21 Nov 2012 16:57:22 +0000	[thread overview]
Message-ID: <1353517042.26346.130.camel@shinybook.infradead.org> (raw)
In-Reply-To: <20120602235020.2C0A57C006C@ra.kernel.org>

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

On Sat, 2012-06-02 at 23:50 +0000, Linux Kernel Mailing List wrote:
> Gitweb:     http://git.kernel.org/linus/;a=commit;h=b01af4579ec41f48e9b9c774e70bd6474ad210db
> Commit:     b01af4579ec41f48e9b9c774e70bd6474ad210db
> Parent:     20e2a86485967c385d7c7befc1646e4d1d39362e
> Author:     Jason Wang <jasowang@redhat.com>
> AuthorDate: Thu May 31 18:19:39 2012 +0000
> Committer:  David S. Miller <davem@davemloft.net>
> CommitDate: Fri Jun 1 14:22:11 2012 -0400
> 
>     8139cp: set ring address before enabling receiver
>     
>     Currently, we enable the receiver before setting the ring address which could
>     lead the card DMA into unexpected areas. Solving this by set the ring address
>     before enabling the receiver.
>     
>     btw. I find and test this in qemu as I didn't have a 8139cp card in hand. please
>     review it carefully.
>     
>     Signed-off-by: Jason Wang <jasowang@redhat.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>

This commit appears to break Ethernet on my Traverse Geos router. With
OpenWRT and 3.6.6 I get:

[  124.068359] NETDEV WATCHDOG: eth1 (8139cp): transmit queue 0 timed out  
 ...     
[  124.260614] 8139cp 0000:00:0b.0: eth1: Transmit timeout, status  c   2b    1 80ac                                                                            


If I add code to *read* the *RingAddr registers, at the later point in
cp_init_hw() that they *used* to be set, I get the following:

[ 1126.909193] HiTxRingAddr 0000000000000000 (should be 0)                             
[ 1126.913880] RxRingAddr   000000000f1e5000 (sb f1e5000)                       
[ 1126.919018] TxRingAddr   000000000f344400 (sb f1e5400) 

Adding further debugging indicates that it's being changed in
cp_start_hw(), at the line which writes the CpCmd register. These two
outputs are from the surrounding lines...

[ 1331.650579] at line 960 TxRingAddr   000000000f3c6400 (sb f3c6400)           
[ 1331.656820] at line 962 TxRingAddr   000000000f3e4400 (sb f3c6400)  

The devices are:
00:0a.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ [10ec:8139] (rev 20)                                                  
00:0b.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ [10ec:8139] (rev 20)      

The other one (eth0) isn't connected, which is why I only see the errors
from eth1.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation




[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 6171 bytes --]

       reply	other threads:[~2012-11-21 16:57 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 ` David Woodhouse [this message]
2012-11-21 18:12   ` 8139cp: set ring address before enabling receiver 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
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=1353517042.26346.130.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=jgarzik@pobox.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 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).