aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2009-08-25 17:02:38 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-10 13:07:51 -0400
commit3667d7e7f7bb63a394f73a671fdaf4a187aa858e (patch)
tree37f4b8af4d5faab8b3cbcc92ee2561a896f8bcd8 /drivers/scsi
parentc762608bf75f792dcaf3658338189b9970951704 (diff)
[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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libfc/fc_disc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 9b8043bdeddb..3efdbbab9b2b 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -233,6 +233,7 @@ static void fc_disc_restart(struct fc_disc *disc)
233 * freshly-discovered remote ports. Avoid wrapping to zero. 233 * freshly-discovered remote ports. Avoid wrapping to zero.
234 */ 234 */
235 disc->disc_id = (disc->disc_id + 2) | 1; 235 disc->disc_id = (disc->disc_id + 2) | 1;
236 disc->retry_count = 0;
236 fc_disc_gpn_ft_req(disc); 237 fc_disc_gpn_ft_req(disc);
237} 238}
238 239
@@ -563,8 +564,7 @@ static void fc_disc_timeout(struct work_struct *work)
563 struct fc_disc, 564 struct fc_disc,
564 disc_work.work); 565 disc_work.work);
565 mutex_lock(&disc->disc_mutex); 566 mutex_lock(&disc->disc_mutex);
566 if (disc->requested && !disc->pending) 567 fc_disc_gpn_ft_req(disc);
567 fc_disc_gpn_ft_req(disc);
568 mutex_unlock(&disc->disc_mutex); 568 mutex_unlock(&disc->disc_mutex);
569} 569}
570 570