Commit d8ae662b authored by Himanshu Madhani's avatar Himanshu Madhani Committed by Greg Kroah-Hartman

scsi: qla2xxx: Fix LUN discovery if loop id is not assigned yet by firmware

commit ec322937 upstream.

This patch fixes LUN discovery when loop ID is not yet assigned by the
firmware during driver load/sg_reset operations. Driver will now search for
new loop id before retrying login.

Fixes: 48acad09 ("scsi: qla2xxx: Fix N2N link re-connect")
Cc: stable@vger.kernel.org #4.19
Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f4a9fd56
...@@ -643,11 +643,14 @@ static void qla24xx_handle_gnl_done_event(scsi_qla_host_t *vha, ...@@ -643,11 +643,14 @@ static void qla24xx_handle_gnl_done_event(scsi_qla_host_t *vha,
break; break;
case DSC_LS_PORT_UNAVAIL: case DSC_LS_PORT_UNAVAIL:
default: default:
if (fcport->loop_id != FC_NO_LOOP_ID) if (fcport->loop_id == FC_NO_LOOP_ID) {
qla2x00_clear_loop_id(fcport); qla2x00_find_new_loop_id(vha, fcport);
fcport->fw_login_state =
fcport->loop_id = loop_id; DSC_LS_PORT_UNAVAIL;
fcport->fw_login_state = DSC_LS_PORT_UNAVAIL; }
ql_dbg(ql_dbg_disc, vha, 0x20e5,
"%s %d %8phC\n", __func__, __LINE__,
fcport->port_name);
qla24xx_fcport_handle_login(vha, fcport); qla24xx_fcport_handle_login(vha, fcport);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment