Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: qla2xxx: edif: Fix session thrash

Current code prematurely sends out PRLI before authentication application
has given the OK to do so. This causes PRLI failure and session teardown.

Prevents PRLI from going out before authentication app gives the OK.

Link: https://lore.kernel.org/r/20220608115849.16693-7-njavali@marvell.com
Fixes: 91f6f5fbe87b ("scsi: qla2xxx: edif: Reduce connection thrash")
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Quinn Tran and committed by
Martin K. Petersen
a8fdfb0b d7e2e4a6

+14 -2
+1 -1
drivers/scsi/qla2xxx/qla_edif.c
··· 3517 3517 if (qla_bsg_check(vha, bsg_job, fcport)) 3518 3518 return 0; 3519 3519 3520 - if (fcport->loop_id == FC_NO_LOOP_ID) { 3520 + if (EDIF_SESS_DELETE(fcport)) { 3521 3521 ql_dbg(ql_dbg_edif, vha, 0x910d, 3522 3522 "%s ELS code %x, no loop id.\n", __func__, 3523 3523 bsg_request->rqst_data.r_els.els_code);
+4
drivers/scsi/qla2xxx/qla_edif.h
··· 141 141 (DBELL_ACTIVE(_fcport->vha) && \ 142 142 (_fcport->disc_state == DSC_LOGIN_AUTH_PEND)) 143 143 144 + #define EDIF_SESS_DELETE(_s) \ 145 + (qla_ini_mode_enabled(_s->vha) && (_s->disc_state == DSC_DELETE_PEND || \ 146 + _s->disc_state == DSC_DELETED)) 147 + 144 148 #endif /* __QLA_EDIF_H */
+9 -1
drivers/scsi/qla2xxx/qla_init.c
··· 1762 1762 break; 1763 1763 1764 1764 case DSC_LOGIN_PEND: 1765 - if (fcport->fw_login_state == DSC_LS_PLOGI_COMP) 1765 + if (vha->hw->flags.edif_enabled) 1766 + break; 1767 + 1768 + if (fcport->fw_login_state == DSC_LS_PLOGI_COMP) { 1769 + ql_dbg(ql_dbg_disc, vha, 0x2118, 1770 + "%s %d %8phC post %s PRLI\n", 1771 + __func__, __LINE__, fcport->port_name, 1772 + NVME_TARGET(vha->hw, fcport) ? "NVME" : "FC"); 1766 1773 qla24xx_post_prli_work(vha, fcport); 1774 + } 1767 1775 break; 1768 1776 1769 1777 case DSC_UPD_FCPORT: