IB/hfi1: Extend i2c timeout
authorDean Luick <dean.luick@intel.com>
Sun, 25 Sep 2016 14:41:25 +0000 (07:41 -0700)
committerDoug Ledford <dledford@redhat.com>
Sun, 2 Oct 2016 12:42:13 +0000 (08:42 -0400)
Allow a longer timeout for i2c due to clock stretching and
inaccurate jiffy timing when under a spin lock.  This timeout
is consistent with other i2c-algo-bit users.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/qsfp.c

index 4e95ad8..1869f63 100644 (file)
@@ -161,7 +161,7 @@ static struct hfi1_i2c_bus *init_i2c_bus(struct hfi1_devdata *dd,
        bus->algo.getsda = hfi1_getsda;
        bus->algo.getscl = hfi1_getscl;
        bus->algo.udelay = 5;
-       bus->algo.timeout = usecs_to_jiffies(50);
+       bus->algo.timeout = usecs_to_jiffies(100000);
        bus->algo.data = bus;
 
        bus->adapter.owner = THIS_MODULE;