Message ID | 20190410052916.22129-3-hmadhani@marvell.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | qla2xxx: Driver fixes for 5.1-rc | expand |
On Tue, 2019-04-09 at 22:29 -0700, Himanshu Madhani wrote: > From: Quinn Tran <quinn.tran@cavium.com> > > Prevent driver from endless loop or hang in the case of > NPort ID change. > > Following stack trace is seen > > Feb 12 08:21:17 localhost kernel: Call Trace: > Feb 12 08:21:17 localhost kernel: ? Please include the line reported above "Call Trace" that indicates the type of the issue that was detected by the kernel (INFO, WARNING or BUG). Thanks, Bart.
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 0c700b140ce7..88eaf4b66875 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -602,12 +602,15 @@ static void qla24xx_handle_gnl_done_event(scsi_qla_host_t *vha, break; default: if ((id.b24 != fcport->d_id.b24 && - fcport->d_id.b24) || + fcport->d_id.b24 && + fcport->loop_id != FC_NO_LOOP_ID) || (fcport->loop_id != FC_NO_LOOP_ID && fcport->loop_id != loop_id)) { ql_dbg(ql_dbg_disc, vha, 0x20e3, "%s %d %8phC post del sess\n", __func__, __LINE__, fcport->port_name); + if (fcport->n2n_flag) + fcport->d_id.b24 = 0; qlt_schedule_sess_for_deletion(fcport); return; } @@ -615,6 +618,8 @@ static void qla24xx_handle_gnl_done_event(scsi_qla_host_t *vha, } fcport->loop_id = loop_id; + if (fcport->n2n_flag) + fcport->d_id.b24 = id.b24; wwn = wwn_to_u64(fcport->port_name); qlt_find_sess_invalidate_other(vha, wwn,