From: Joe Eykholt Date: Tue, 25 Aug 2009 21:02:17 +0000 (-0700) Subject: [SCSI] libfc: discovery restart sequence error fix X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=c356afd48690775097507c37780ee17c0b0ea375;p=deliverable%2Flinux.git [SCSI] libfc: discovery restart sequence error fix When an RSCN is received during fabric discovery, it restarts. After the restart, disc->seq_count was incremented, so when the first frame was received, it was considered "out of sequence". That left the state disc->active, preventing further discoveries. Change to advance the sequence count before parsing, so that it won't be changed after a potential restart. Signed-off-by: Joe Eykholt Signed-off-by: Robert Love Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index ddf494424ff4..fd3a6b287e98 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c @@ -629,11 +629,10 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp, seq_cnt, disc->seq_count, fr_sof(fp), fr_eof(fp)); } if (buf) { + disc->seq_count++; error = fc_disc_gpn_ft_parse(disc, buf, len); if (error) fc_disc_error(disc, fp); - else - disc->seq_count++; } fc_frame_free(fp);