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."
[EMAIL PROTECTED] `---------------------------------- (random fortune)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to