[SCSI] ibmvfc: Better handle other FC initiators
authorBrian King <brking@linux.vnet.ibm.com>
Tue, 3 Feb 2009 00:39:40 +0000 (18:39 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 12 Mar 2009 17:58:12 +0000 (12:58 -0500)
commita3b7aeaba29e3dd995ece05ba50db9e0650c16b6
treeb67ee797f1dd21d33e889efbdabd5e408d179e3d
parentea41e41588c248ee8b8162869c1e1c0565a4b3f6
[SCSI] ibmvfc: Better handle other FC initiators

The ibmvfc driver currently always sets the role of all rports
to FC_PORT_ROLE_FCP_TARGET, which is not correct for other initiators.
This can cause problems if other initiators are on the fabric
when we then try to scan the rport for LUNs. Fix this by looking
at the service parameters returned in the PRLI to set the roles
appropriately. Also look at the returned service parameters to
decide whether or not we were actually able to successfully log into
the target.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/ibmvscsi/ibmvfc.c