diff options
author | Joe Eykholt <jeykholt@cisco.com> | 2009-08-25 17:02:54 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-10 13:07:56 -0400 |
commit | 935d0fce44b906268b8a29de4e72ebb57a3a06d8 (patch) | |
tree | 359f91d64556d06964b418b77b2a25f4f89c50d1 /drivers | |
parent | 29d898e909e3d086055e2649f5a24d4c2c1ca884 (diff) |
[SCSI] libfc: don't do discovery before callback is set
It's possible to "restart" discovery before it was started if
an RSCN is received early enough. We were jumping to 0
due to the disc_callback function pointer not getting set.
Don't restart discovery if disc_callback is NULL.
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')
-rw-r--r-- | drivers/scsi/libfc/fc_disc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index 428421842f3a..1a699f484c85 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c | |||
@@ -219,6 +219,9 @@ static void fc_disc_recv_req(struct fc_seq *sp, struct fc_frame *fp, | |||
219 | */ | 219 | */ |
220 | static void fc_disc_restart(struct fc_disc *disc) | 220 | static void fc_disc_restart(struct fc_disc *disc) |
221 | { | 221 | { |
222 | if (!disc->disc_callback) | ||
223 | return; | ||
224 | |||
222 | FC_DISC_DBG(disc, "Restarting discovery\n"); | 225 | FC_DISC_DBG(disc, "Restarting discovery\n"); |
223 | 226 | ||
224 | disc->requested = 1; | 227 | disc->requested = 1; |