lkml.org 
[lkml]   [2000]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Softnet/eepro100 driver conversion bug in 2.3.43pre8?
Hello,

On Sat, Feb 12, 2000 at 06:19:53PM -0800, David S. Miller wrote:
> Date: Sat, 12 Feb 2000 17:31:20 -0800
> From: David Mosberger <davidm@hpl.hp.com>
>
> The following patch seems to fix the problem for me. I think the
> cmpxchg should be #ifdef'd on HAVE_CMPXCHG but in our experience,
> atomicity is important for updating cmd_status, so if you can't do
> this atomically, you're probably hosed anyhow (you'll get lots of
> Tx timeouts, at least).
>
> I don't think it needs to be atomic at all.
>
> The correct behavior can be obtained without the atomic accesses
> if the ordering of operations is done correctly (with _maybe_ some
> help from some mb() calls), and this problem is no different than the
> one nearly every other ring-descriptor based ethernet driver has to
> deal with, the race between the card seeing a tx descriptor updated
> and the cpu completing the update.
>
> I'd really prefer if this driver does not try to treat the problem in
> this way, it's not unique, and it's more expensive to do the atomic
> operation as well.

Sorry for the late response.
Yeah, the cmd_status is a very important thing.
The culprit of the problem is the simultaneous update of the status part of
the word by the card and the command part by the driver.

The problem can be relieved by atomic operations on the word.
However, e.g. the operations with "lock" prefix appear to be not sufficient:
experiments have proven it. I'm not sure about cmpxchg.

It looks like that on x86 the problem can be solved by using 16-bit
operations on the proper part of the word. But I'm not sure that in not-PC
world 16-bit operations have the same behavior.

Nevertheless, I'm aware of the problems and working on it.

Best regards
Andrey V.
Savochkin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.093 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site