Skip to content

Commit 5b51f35

Browse files
Quinn Tranmartinkpetersen
authored andcommitted
scsi: qla2xxx: Fix erroneous link up failure
Link up failure occurred where driver failed to see certain events from FW indicating link up (AEN 8011) and fabric login completion (AEN 8014). Without these 2 events, driver would not proceed forward to scan the fabric. The cause of this is due to delay in the receive of interrupt for Mailbox 60 that causes qla to set the fw_started flag late. The late setting of this flag causes other interrupts to be dropped. These dropped interrupts happen to be the link up (AEN 8011) and fabric login completion (AEN 8014). Set fw_started flag early to prevent interrupts being dropped. Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Link: https://lore.kernel.org/r/20230714070104.40052-6-njavali@marvell.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent da7c21b commit 5b51f35

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4815,15 +4815,16 @@ qla2x00_init_rings(scsi_qla_host_t *vha)
48154815
if (ha->flags.edif_enabled)
48164816
mid_init_cb->init_cb.frame_payload_size = cpu_to_le16(ELS_MAX_PAYLOAD);
48174817

4818+
QLA_FW_STARTED(ha);
48184819
rval = qla2x00_init_firmware(vha, ha->init_cb_size);
48194820
next_check:
48204821
if (rval) {
4822+
QLA_FW_STOPPED(ha);
48214823
ql_log(ql_log_fatal, vha, 0x00d2,
48224824
"Init Firmware **** FAILED ****.\n");
48234825
} else {
48244826
ql_dbg(ql_dbg_init, vha, 0x00d3,
48254827
"Init Firmware -- success.\n");
4826-
QLA_FW_STARTED(ha);
48274828
vha->u_ql2xexchoffld = vha->u_ql2xiniexchg = 0;
48284829
}
48294830

drivers/scsi/qla2xxx/qla_isr.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,12 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
11211121
unsigned long flags;
11221122
fc_port_t *fcport = NULL;
11231123

1124-
if (!vha->hw->flags.fw_started)
1124+
if (!vha->hw->flags.fw_started) {
1125+
ql_log(ql_log_warn, vha, 0x50ff,
1126+
"Dropping AEN - %04x %04x %04x %04x.\n",
1127+
mb[0], mb[1], mb[2], mb[3]);
11251128
return;
1129+
}
11261130

11271131
/* Setup to process RIO completion. */
11281132
handle_cnt = 0;

0 commit comments

Comments
 (0)