[SCSI] libfc: do not log off rports before or after discovery
When receiving an RSCN, do not log off all rports. This is
extremely disruptive. If, after the GPN_FT response, some
rports haven't been listed, delete them.
Add field disc_id to structs fc_rport_priv and fc_disc.
disc_id is an arbitrary serial number used to identify the
rports found by the latest discovery. This eliminates the need
to go through the rport list when restarting discovery.
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>
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 093b043..517dce5 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -202,6 +202,7 @@
* @ids: remote port identifiers and roles
* @flags: REC and RETRY supported flags
* @max_seq: maximum number of concurrent sequences
+ * @disc_id: discovery identifier
* @maxframe_size: maximum frame size
* @retries: retry count in current state
* @e_d_tov: error detect timeout value (in msec)
@@ -218,6 +219,7 @@
struct fc_rport_identifiers ids;
u16 flags;
u16 max_seq;
+ u16 disc_id;
u16 maxframe_size;
unsigned int retries;
unsigned int e_d_tov;
@@ -678,6 +680,7 @@
unsigned char requested;
unsigned short seq_count;
unsigned char buf_len;
+ u16 disc_id;
void (*disc_callback)(struct fc_lport *,
enum fc_disc_event);