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: Send LOGO for unexpected IKE message

If the session is down and the local port continues to receive AUTH ELS
messages, the driver needs to send back LOGO so that the remote device
knows to tear down its session. Terminate and clean up the AUTH ELS
exchange followed by a passthrough LOGO.

Link: https://lore.kernel.org/r/20220608115849.16693-3-njavali@marvell.com
Fixes: 225479296c4f ("scsi: qla2xxx: edif: Reject AUTH ELS on session down")
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
2b659ed6 63ab6cb5

+18 -3
+17 -2
drivers/scsi/qla2xxx/qla_edif.c
··· 2565 2565 2566 2566 fcport = qla2x00_find_fcport_by_pid(host, &purex->pur_info.pur_sid); 2567 2567 2568 - if (DBELL_INACTIVE(vha) || 2569 - (fcport && EDIF_SESSION_DOWN(fcport))) { 2568 + if (DBELL_INACTIVE(vha)) { 2570 2569 ql_dbg(ql_dbg_edif, host, 0x0910c, "%s e_dbell.db_flags =%x %06x\n", 2571 2570 __func__, host->e_dbell.db_flags, 2572 2571 fcport ? fcport->d_id.b24 : 0); 2573 2572 2574 2573 qla_els_reject_iocb(host, (*rsp)->qpair, &a); 2575 2574 qla_enode_free(host, ptr); 2575 + return; 2576 + } 2577 + 2578 + if (fcport && EDIF_SESSION_DOWN(fcport)) { 2579 + ql_dbg(ql_dbg_edif, host, 0x13b6, 2580 + "%s terminate exchange. Send logo to 0x%x\n", 2581 + __func__, a.did.b24); 2582 + 2583 + a.tx_byte_count = a.tx_len = 0; 2584 + a.tx_addr = 0; 2585 + a.control_flags = EPD_RX_XCHG; /* EPD_RX_XCHG = terminate cmd */ 2586 + qla_els_reject_iocb(host, (*rsp)->qpair, &a); 2587 + qla_enode_free(host, ptr); 2588 + /* send logo to let remote port knows to tear down session */ 2589 + fcport->send_els_logo = 1; 2590 + qlt_schedule_sess_for_deletion(fcport); 2576 2591 return; 2577 2592 } 2578 2593
+1 -1
drivers/scsi/qla2xxx/qla_fw.h
··· 807 807 #define EPD_ELS_COMMAND (0 << 13) 808 808 #define EPD_ELS_ACC (1 << 13) 809 809 #define EPD_ELS_RJT (2 << 13) 810 - #define EPD_RX_XCHG (3 << 13) 810 + #define EPD_RX_XCHG (3 << 13) /* terminate exchange */ 811 811 #define ECF_CLR_PASSTHRU_PEND BIT_12 812 812 #define ECF_INCL_FRAME_HDR BIT_11 813 813 #define ECF_SEC_LOGIN BIT_3