[SCSI] libfc: correctly handle incoming PLOGI request.
authorJoe Eykholt <jeykholt@cisco.com>
Tue, 25 Aug 2009 21:03:26 +0000 (14:03 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 10 Sep 2009 17:08:00 +0000 (12:08 -0500)
commit3ac6f98f4113ec1c115cf9d443a9bff816e47c0b
treef5fb72bb0f73a6304bcba19e1d3f1ffbfdfd6702
parentf657d299cf05883e23e12a69e86842da1df378ad
[SCSI] libfc: correctly handle incoming PLOGI request.

libfc receives PLOGIs from switches which are trying to discover what
kind of devices are present, and from other initiators to find out
if we're a target.

As an initiator, some argue we don't need to handle incoming PLOGI
requests, and we currently reject them from unknown remote ports,
but accept them is we're in the middle of a PLOGI to the remote port.

For eventual target implementations, we want to handle them always.

For incoming PLOGI, don't fail if the rport_priv doesn't exist.
Just create it and go become READY without going through PRLI.  If
PRLI occurs, then our roles will be set and we'll become READY again.

Also, allow incoming PRLI in RTV state.

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_rport.c