]> Pileus Git - ~andy/linux/commitdiff
[PATCH] ieee1394: skip unnecessary pause when scanning config ROMs
authorJody McIntyre <scjody@steamballoon.com>
Fri, 30 Sep 2005 18:59:09 +0000 (11:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 30 Sep 2005 19:41:19 +0000 (12:41 -0700)
Skip a superfluous pause that occured when the config ROM of a node was
scanned unsuccessfully.  This also occurs if a node without link wrongly
enables its "link active" self ID flag.  A GWCTech 6-port hub does this.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jody McIntyre <scjody@steamballoon.com>
Cc: Ben Collins <bcollins@debian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/ieee1394/nodemgr.c

index 743f13c81adbb2ca5b35d70f36961dba71a1f97d..347ece6b583c19cdf67e521dcb5ae3ebf2c1ecdd 100644 (file)
@@ -64,10 +64,10 @@ static int nodemgr_bus_read(struct csr1212_csr *csr, u64 addr, u16 length,
        struct nodemgr_csr_info *ci = (struct nodemgr_csr_info*)__ci;
        int i, ret = 0;
 
-       for (i = 0; i < 3; i++) {
+       for (i = 1; ; i++) {
                ret = hpsb_read(ci->host, ci->nodeid, ci->generation, addr,
                                buffer, length);
-               if (!ret)
+               if (!ret || i == 3)
                        break;
 
                if (msleep_interruptible(334))