From: Mike Christie Date: Thu, 31 Jan 2008 19:36:50 +0000 (-0600) Subject: [SCSI] libiscsi: fix setting of nop timer X-Git-Tag: v2.6.25-rc1~285^2~33 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad294e9cd11d029fc0d09ab129fba5bea46de0dc;p=linux-2.6 [SCSI] libiscsi: fix setting of nop timer 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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index c8c00e1734..b2a1ec8725 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -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); }