lkml.org 
[lkml]   [2001]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pcnet32.c ARM support & AM79C973 improvements
Eli Carter wrote:
> Here is a patch that adds the following to the pcnet32.c driver:
[snip]
> - According to the Am79C973/Am79C975 docs from AMD, The collision bits
> are only valid if ENP is set, so I added a check for that.
[snip]
> @@ -1164,7 +1206,8 @@
> }
> #endif
> } else {
> - if (status & 0x1800)
> + /* MORE and ONE are only valid if ENP is set */
> + if (status & 0x0040 && status & 0x1800)
> lp->stats.collisions++;
> lp->stats.tx_packets++;
> }

Argh. That should read
+ if (status & (1<<8) && status & 0x1800)
I'm tempted to change some of these magical numbers into #defines...
That would make it a bit easier to read, but have no functional
changes--would such a patch be accepted into the various trees?

Just my two bits. ;)

Eli
--------------------. "To the systems programmer, users and applications
Eli Carter | serve only to provide a test load."
eli.carter@inet.com `---------------------------------- (random fortune)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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