diff options
author | Mitko Haralanov <mitko@qlogic.com> | 2011-05-10 07:07:31 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-05-10 07:07:31 +0200 |
commit | 9f5754e34bf964a41e821b2e0b358bc7c314ca4e (patch) | |
tree | 755d47a9e64526d8c91194af84aba08286957a4a /drivers/infiniband | |
parent | Linux 2.6.39-rc7 (diff) | |
download | linux-9f5754e34bf964a41e821b2e0b358bc7c314ca4e.tar.xz linux-9f5754e34bf964a41e821b2e0b358bc7c314ca4e.zip |
IB/qib: Prevent driver hang with unprogrammed boards
The time limit test now correctly checks against current jiffies to
avoid the hang.
Signed-off-by: Mitko Haralanov <mitko@qlogic.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_iba7322.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index 6bab3eaea70f..9f53e68a096a 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c @@ -7534,7 +7534,8 @@ static int serdes_7322_init_new(struct qib_pportdata *ppd) ibsd_wr_allchans(ppd, 4, (1 << 10), BMASK(10, 10)); tstart = get_jiffies_64(); while (chan_done && - !time_after64(tstart, tstart + msecs_to_jiffies(500))) { + !time_after64(get_jiffies_64(), + tstart + msecs_to_jiffies(500))) { msleep(20); for (chan = 0; chan < SERDES_CHANS; ++chan) { rxcaldone = ahb_mod(ppd->dd, IBSD(ppd->hw_pidx), |