scsi: qla2xxx: Relogin during fabric disturbance
[ Upstream commit bb2ca6b3f09ac20e8357d257d0557ab5ddf6adcd ]
For RSCN of type "Area, Domain, or Fabric", which indicate a portion or
entire fabric was disturbed, current driver does not set the scan_need flag
to indicate a session was affected by the disturbance. This in turn can
lead to I/O timeout and delay of relogin. Hence initiate relogin in the
event of fabric disturbance.
Link: https://lore.kernel.org/r/20211026115412.27691-2-njavali@marvell.com
Fixes: 1560bafdff
("scsi: qla2xxx: Use complete switch scan for RSCN events")
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
bc3f207ed9
commit
cbe31149e5
@@ -1708,6 +1708,8 @@ void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea)
|
|||||||
fc_port_t *fcport;
|
fc_port_t *fcport;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
|
switch (ea->id.b.rsvd_1) {
|
||||||
|
case RSCN_PORT_ADDR:
|
||||||
fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1);
|
fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1);
|
||||||
if (fcport) {
|
if (fcport) {
|
||||||
if (fcport->flags & FCF_FCP2_DEVICE) {
|
if (fcport->flags & FCF_FCP2_DEVICE) {
|
||||||
@@ -1719,6 +1721,40 @@ void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea)
|
|||||||
fcport->scan_needed = 1;
|
fcport->scan_needed = 1;
|
||||||
fcport->rscn_gen++;
|
fcport->rscn_gen++;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case RSCN_AREA_ADDR:
|
||||||
|
list_for_each_entry(fcport, &vha->vp_fcports, list) {
|
||||||
|
if (fcport->flags & FCF_FCP2_DEVICE)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ((ea->id.b24 & 0xffff00) == (fcport->d_id.b24 & 0xffff00)) {
|
||||||
|
fcport->scan_needed = 1;
|
||||||
|
fcport->rscn_gen++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RSCN_DOM_ADDR:
|
||||||
|
list_for_each_entry(fcport, &vha->vp_fcports, list) {
|
||||||
|
if (fcport->flags & FCF_FCP2_DEVICE)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ((ea->id.b24 & 0xff0000) == (fcport->d_id.b24 & 0xff0000)) {
|
||||||
|
fcport->scan_needed = 1;
|
||||||
|
fcport->rscn_gen++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RSCN_FAB_ADDR:
|
||||||
|
default:
|
||||||
|
list_for_each_entry(fcport, &vha->vp_fcports, list) {
|
||||||
|
if (fcport->flags & FCF_FCP2_DEVICE)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
fcport->scan_needed = 1;
|
||||||
|
fcport->rscn_gen++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
spin_lock_irqsave(&vha->work_lock, flags);
|
spin_lock_irqsave(&vha->work_lock, flags);
|
||||||
if (vha->scan.scan_flags == 0) {
|
if (vha->scan.scan_flags == 0) {
|
||||||
|
Reference in New Issue
Block a user