lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1353517042.26346.130.camel@shinybook.infradead.org>
Date:	Wed, 21 Nov 2012 16:57:22 +0000
From:	David Woodhouse <dwmw2@...radead.org>
To:	Jason Wang <jasowang@...hat.com>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Jeff Garzik <jgarzik@...ox.com>
Subject: Re: 8139cp: set ring address before enabling receiver

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@...hat.com>
> AuthorDate: Thu May 31 18:19:39 2012 +0000
> Committer:  David S. Miller <davem@...emloft.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@...hat.com>
>     Signed-off-by: David S. Miller <davem@...emloft.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@...el.com                              Intel Corporation




Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (6171 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ