From: Ben Dooks Date: Tue, 5 Feb 2008 00:02:22 +0000 (+0000) Subject: DM9000: Update retry count whilst identifying chip X-Git-Tag: v2.6.25-rc2~2^2~31^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=513b6bee0156812bce4f38c497dfc7cf9ee9a609;p=platform%2Fkernel%2Flinux-3.10.git DM9000: Update retry count whilst identifying chip Reading the ID register does not always return the correct ID from the device, so we retry several times to see if we get a correct value. These failures seem to be excaserbated by the speed of the access to the chip (possibly time between issuing the address and then the data cycle). Signed-off-by: Ben Dooks Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index e52078b..8e80782 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -643,7 +643,7 @@ dm9000_probe(struct platform_device *pdev) dm9000_reset(db); /* try two times, DM9000 sometimes gets the first read wrong */ - for (i = 0; i < 2; i++) { + for (i = 0; i < 8; i++) { id_val = ior(db, DM9000_VIDL); id_val |= (u32)ior(db, DM9000_VIDH) << 8; id_val |= (u32)ior(db, DM9000_PIDL) << 16;