Skip to content

Commit

Permalink
[SCSI] libiscsi: fix setting of nop timer
Browse files Browse the repository at this point in the history
If we rollover then we could get a next_timeout of zero, so we need
to set the new timer to that value.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Mike Christie authored and James Bottomley committed Feb 8, 2008
1 parent 921601b commit ad294e9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,14 +1384,11 @@ static void iscsi_check_transport_timeouts(unsigned long data)
iscsi_send_nopout(conn, NULL);
}
next_timeout = last_recv + timeout + (conn->ping_timeout * HZ);
} else {
} else
next_timeout = last_recv + timeout;
}

if (next_timeout) {
debug_scsi("Setting next tmo %lu\n", next_timeout);
mod_timer(&conn->transport_timer, next_timeout);
}
debug_scsi("Setting next tmo %lu\n", next_timeout);
mod_timer(&conn->transport_timer, next_timeout);
done:
spin_unlock(&session->lock);
}
Expand Down

0 comments on commit ad294e9

Please sign in to comment.