[SCSI] libfc: discovery retry should clear pending first.
authorJoe Eykholt <jeykholt@cisco.com>
Tue, 25 Aug 2009 21:02:38 +0000 (14:02 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 10 Sep 2009 17:07:51 +0000 (12:07 -0500)
commit3667d7e7f7bb63a394f73a671fdaf4a187aa858e
tree37f4b8af4d5faab8b3cbcc92ee2561a896f8bcd8
parentc762608bf75f792dcaf3658338189b9970951704
[SCSI] libfc: discovery retry should clear pending first.

Currently fc_disc_timeout() restarts discovery only if it is not pending.
When the timer is scheduled, the discovery is left pending, so the
timeout never restarts it.

Fix by not checking for pending in the timeout handler.

If discovery is stopped and restarted in the meantime, the timeout will
be canceled.

Also, when a new discovery is started, the retry count wasn't cleared.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/libfc/fc_disc.c