]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] libiscsi: fix setting of nop timer
authorMike Christie <michaelc@cs.wisc.edu>
Thu, 31 Jan 2008 19:36:50 +0000 (13:36 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 8 Feb 2008 00:02:37 +0000 (18:02 -0600)
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>
drivers/scsi/libiscsi.c

index c8c00e17341450320edf54665946edde29f91cd9..b2a1ec8725b8a1df146a040c333c23e117d3afd8 100644 (file)
@@ -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);
 }