[SCSI] qla2xxx: Verify login-state has transitioned to PRLI-completed.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Wed, 30 Mar 2011 18:46:31 +0000 (11:46 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 1 May 2011 15:14:17 +0000 (10:14 -0500)
commita4f92a32a0fb827f7bd40c69f021cf57d3dc4249
treec6a991598b8dca872fd367026d75f0fd9c55361b
parent92dbf273921eb53a9d5b760a8f3b32eefd776b1b
[SCSI] qla2xxx: Verify login-state has transitioned to PRLI-completed.

Before driver's own internal state is marked as PLOGI/PRLI
complete. This additional check closes a window seen with
dual-personality initiator/target devices where a driver's
PLOGI/PRLI request occurs within the window after the target's
PLOGI request has completed, but prior to the target's PRLI
arriving and processed by the firmware. Without this additional
check, the firmware will return port-information stating that the
port neither supports target nor initiator functions, causing the
driver to register the rport prematurely to the FC-transport
without the proper 'roles' being set.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_mbx.c