Re: [PATCH] pcnet32.c ARM support & AM79C973 improvements

Eli Carter (eli.carter@inet.com)
Thu, 18 Jan 2001 12:37:35 -0600


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/