diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2011-03-30 11:46:31 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-05-01 10:14:17 -0500 |
commit | a4f92a32a0fb827f7bd40c69f021cf57d3dc4249 (patch) | |
tree | c6a991598b8dca872fd367026d75f0fd9c55361b /drivers/scsi/qla2xxx/qla_init.c | |
parent | 92dbf273921eb53a9d5b760a8f3b32eefd776b1b (diff) | |
download | kernel_samsung_smdk4412-a4f92a32a0fb827f7bd40c69f021cf57d3dc4249.zip kernel_samsung_smdk4412-a4f92a32a0fb827f7bd40c69f021cf57d3dc4249.tar.gz kernel_samsung_smdk4412-a4f92a32a0fb827f7bd40c69f021cf57d3dc4249.tar.bz2 |
[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>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 234c1c2..d31ac9b 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -383,6 +383,17 @@ qla2x00_async_login_done(struct scsi_qla_host *vha, fc_port_t *fcport, switch (data[0]) { case MBS_COMMAND_COMPLETE: + /* + * Driver must validate login state - If PRLI not complete, + * force a relogin attempt via implicit LOGO, PLOGI, and PRLI + * requests. + */ + rval = qla2x00_get_port_database(vha, fcport, 0); + if (rval != QLA_SUCCESS) { + qla2x00_post_async_logout_work(vha, fcport, NULL); + qla2x00_post_async_login_work(vha, fcport, NULL); + break; + } if (fcport->flags & FCF_FCP2_DEVICE) { qla2x00_post_async_adisc_work(vha, fcport, data); break; |