scsi: qla2xxx: edif: Fix session thrash
[linux-2.6-microblaze.git] / drivers / scsi / qla2xxx / qla_init.c
index d915c1f..6070834 100644 (file)
@@ -1762,8 +1762,16 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
                break;
 
        case DSC_LOGIN_PEND:
-               if (fcport->fw_login_state == DSC_LS_PLOGI_COMP)
+               if (vha->hw->flags.edif_enabled)
+                       break;
+
+               if (fcport->fw_login_state == DSC_LS_PLOGI_COMP) {
+                       ql_dbg(ql_dbg_disc, vha, 0x2118,
+                              "%s %d %8phC post %s PRLI\n",
+                              __func__, __LINE__, fcport->port_name,
+                              NVME_TARGET(vha->hw, fcport) ? "NVME" : "FC");
                        qla24xx_post_prli_work(vha, fcport);
+               }
                break;
 
        case DSC_UPD_FCPORT: