]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
bnx2x: HW lock timeout
authorEilon Greenstein <eilong@broadcom.com>
Mon, 25 Aug 2008 22:23:30 +0000 (15:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Aug 2008 22:23:30 +0000 (15:23 -0700)
Increasing the lock timeout to 5 seconds instead of 1 second to minimize
the chance of failures due to timeout

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2x_main.c

index 9972d0c02677743b9296b64be89f5608f425c9b3..cb91802ea48aab174a2d56bb4f3eb0a838482882 100644 (file)
@@ -1717,8 +1717,8 @@ static int bnx2x_acquire_hw_lock(struct bnx2x *bp, u32 resource)
                return -EEXIST;
        }
 
-       /* Try for 1 second every 5ms */
-       for (cnt = 0; cnt < 200; cnt++) {
+       /* Try for 5 second every 5ms */
+       for (cnt = 0; cnt < 1000; cnt++) {
                /* Try to acquire the lock */
                REG_WR(bp, hw_lock_control_reg + 4, resource_bit);
                lock_status = REG_RD(bp, hw_lock_control_reg);