Skip to content

Commit

Permalink
IB/qib: Prevent driver hang with unprogrammed boards
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mitko Haralanov authored and Roland Dreier committed May 10, 2011
1 parent 693d92a commit 9f5754e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/infiniband/hw/qib/qib_iba7322.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 9f5754e

Please sign in to comment.