]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] libfc: send GPN_ID in reaction to single-port RSCNs.
authorJoe Eykholt <jeykholt@cisco.com>
Tue, 25 Aug 2009 21:03:58 +0000 (14:03 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 10 Sep 2009 17:08:03 +0000 (12:08 -0500)
commitdae2e885dd124e3aaf7e842125e1844b2b0c3e75
treecc4fea4717a66e7d1428505bb409146d37e52668
parent9e3a8d3318736e283991f584288c48860ee2699a
[SCSI] libfc: send GPN_ID in reaction to single-port RSCNs.

When an RSCN indicates changes to individual remote ports,
don't blindly log them out and then back in.  Instead, determine
whether they're still in the directory, by doing GPN_ID.

If that is successful, call login, which will send ADISC and reverify,
otherwise, call logoff.  Perhaps we should just delete the rport,
not send LOGO, but it seems safer.

Also, fix a possible issue where if a mix of records in the RSCN
cause us to queue disc_ports for disc_single and then we decide
to do full rediscovery, we leak memory for those disc_ports queued.

So, go through the list of disc_ports even if doing full discovery.
Free the disc_ports in any case.  If any of the disc_single() calls
return error, do a full discovery.

The ability to fill in GPN_ID requests was added to fc_ct_fill().
For this, it needs the FC_ID to be passed in as an arg.
The did parameter for fc_elsct_send() is used for that, since the
actual D_DID will always be 0xfffffc for all CT requests so far.

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
drivers/scsi/libfc/fc_elsct.c
include/scsi/fc_encode.h