scsi: qla2xxx: Fix session state stuck in Get Port DB

This patch sets discovery state back to GNL (Get Name List) when session is
stuck at GPDB (Get Port DataBase). This will allow state machine to retry
login and move session state ahead in discovery.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Quinn Tran 2018-08-02 13:16:50 -07:00 коммит произвёл Martin K. Petersen
Родитель b63d8b895a
Коммит 8fde6977ac
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -1153,9 +1153,12 @@ void qla24xx_handle_gpdb_event(scsi_qla_host_t *vha, struct event_arg *ea)
case PDS_PLOGI_COMPLETE: case PDS_PLOGI_COMPLETE:
case PDS_PRLI_PENDING: case PDS_PRLI_PENDING:
case PDS_PRLI2_PENDING: case PDS_PRLI2_PENDING:
ql_dbg(ql_dbg_disc, vha, 0x20d5, "%s %d %8phC relogin needed\n", /* Set discovery state back to GNL to Relogin attempt */
__func__, __LINE__, fcport->port_name); if (qla_dual_mode_enabled(vha) ||
set_bit(RELOGIN_NEEDED, &vha->dpc_flags); qla_ini_mode_enabled(vha)) {
fcport->disc_state = DSC_GNL;
set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
}
return; return;
case PDS_LOGO_PENDING: case PDS_LOGO_PENDING:
case PDS_PORT_UNAVAILABLE: case PDS_PORT_UNAVAILABLE: