Skip to content

Commit

Permalink
IB/hfi1: Extend i2c timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dean Luick authored and Doug Ledford committed Oct 2, 2016
1 parent f6aa783 commit d5cf683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/hfi1/qsfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d5cf683

Please sign in to comment.