aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-02-04 19:02:22 -0500
committerJeff Garzik <jeff@garzik.org>2008-02-11 11:06:36 -0500
commit513b6bee0156812bce4f38c497dfc7cf9ee9a609 (patch)
treec4ace2c39a97a610ff8cde80a73e13ef58d41f9a /drivers/net
parentf42d8aeaf9a32ec130bc99f2e4ba84cafb028244 (diff)
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 <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/dm9000.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index e52078badaaa..8e8078283465 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -643,7 +643,7 @@ dm9000_probe(struct platform_device *pdev)
643 dm9000_reset(db); 643 dm9000_reset(db);
644 644
645 /* try two times, DM9000 sometimes gets the first read wrong */ 645 /* try two times, DM9000 sometimes gets the first read wrong */
646 for (i = 0; i < 2; i++) { 646 for (i = 0; i < 8; i++) {
647 id_val = ior(db, DM9000_VIDL); 647 id_val = ior(db, DM9000_VIDL);
648 id_val |= (u32)ior(db, DM9000_VIDH) << 8; 648 id_val |= (u32)ior(db, DM9000_VIDH) << 8;
649 id_val |= (u32)ior(db, DM9000_PIDL) << 16; 649 id_val |= (u32)ior(db, DM9000_PIDL) << 16;