Thread (22 messages) flat view 22 messages, 7 authors, 2012-11-25

Re: [PATCH] 8139cp: set ring address after enabling C+ mode

From: Jason Wang <hidden>
Date: 2012-11-22 18:38:11

On 11/22/2012 12:53 PM, Jeff Garzik wrote:
On 11/21/2012 11:39 PM, David Miller wrote:
quoted
From: Jeff Garzik <redacted>
Date: Wed, 21 Nov 2012 22:47:39 -0500
quoted
State A:  pre-b01af457, known working
State B:  b01af457, known broken
State A is also known buggy on the largest consumer of this driver,
the emulated hardware.

Please evaluate this realistically.
If the simulator fails to match the hardware, that is a simulator bug.
CC realtek linux driver mainter (nic_swsd@realtek.com)

The problem the behaviour of the hardware is subtle, and we could not 
just infer it from the datasheet. Another issue is in some situation, 
the datasheet is conflict with what real hardware does, one example is  
the cfg9364 issue mentioned by David ( I also meet it during qemu 
development).

If the hardware always fit garbage into the TxRingAddr register when 
"plus mode" were enabled, it may send something from memory to the wire 
unexpectedly which looks really strange. If it does not change the 
RxRingAddr when enabling C+, another method is to keep setting the rx 
address before C+ enabling but does the tx after.
It is disappointing to work around someone else's software bug in the 
kernel.
Qemu also has some workarounds for the legacy kernels and even in this 
case: it initialize RxRingAddr to 0 and check it during receiving, it 
the addr is still zero ( which may mean the rx ring addr were set after 
the c+ is enabled), it won't do the receiving to prevent the corruption. 
So reverting is safe for rx now.
    Jeff

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help