lkml.org 
[lkml]   [2000]   [Feb]   [12]   [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?
   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.

Later,
David S. Miller
davem@redhat.com

-
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.094 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site