....
 

Guardian Digital Inc. > InfoCenter > Mailing List Archives > Linux Kernel

Linux Kernel Mailing List Archive

From: Christoph Hellwig (hch@infradead.org)
Date: Tue Dec 14 2004 - 18:11:01 EST


On Mon, Dec 13, 2004 at 03:14:31PM -0700, Dale Farnsworth wrote:
> This patch removes spin delays (count to 1000000, ugh) and instead waits
> with udelay or msleep for hardware flags to change.
>
> It also adds a spinlock to protect access to the MV64340_ETH_SMI_REG,
> which is shared across ports.

Care to add a comment with this information? Driver-global locks are
something we tend to avoid, and cases like this one where it's actually
nessecary should be properly documented.

> + for (i=0; i<10; i++) {

This is missing some space, should be:

        for (i = 0; i < 10; i++) {

> +#define PHY_WAIT_ITERATIONS 1000 /* 1000 iterations * 10uS = 10mS max */

Put this into the header or at least ontop of the file?

> + /* wait for the SMI register to become available */
> + for (i=0; MV_READ(MV64340_ETH_SMI_REG) & ETH_SMI_BUSY; i++) {

Missing spaces again.

> + for (i=0; !(MV_READ(MV64340_ETH_SMI_REG) & ETH_SMI_READ_VALID); i++) {

Dito. (And a few more)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



[ About Guardian Digital ] - [ Press Center ] - [ Contact Us ] - [ System Activation ] - [ Reseller Info ] - [ Online Store ] - [ Site Map ]
Copyright (c) 2000 - 2004 Guardian Digital, Inc. Linux Lockbox and EnGarde are Trademarks of Guardian Digital, Inc.