Skip to content

Commit e700cd8

Browse files
Quinn TranSomasundaram Krishnasamy
authored andcommitted
scsi: qla2xxx: Use complete switch scan for RSCN events
This patch removes unnecessary code to handle RSCN, instead performs full scan everytime driver receives RSCN Fixes: d4f7a16 ("scsi: qla2xxx: Remove ASYNC GIDPN switch command") Cc: stable@vger.kernel.org #4.19 Signed-off-by: Quinn Tran <qtran@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Orabug: 29411921 Signed-off-by: John Donnelly <John.P.Donnelly@oracle.com> Reviewed-by: Jack Vogel <jack.vogel@oracle.com> Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
1 parent bf37a8b commit e700cd8

1 file changed

Lines changed: 0 additions & 86 deletions

File tree

‎drivers/scsi/qla2xxx/qla_init.c‎

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,29 +1473,6 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport)
14731473
return 0;
14741474
}
14751475

1476-
static
1477-
void qla24xx_handle_rscn_event(fc_port_t *fcport, struct event_arg *ea)
1478-
{
1479-
fcport->rscn_gen++;
1480-
1481-
ql_dbg(ql_dbg_disc, fcport->vha, 0x210c,
1482-
"%s %8phC DS %d LS %d\n",
1483-
__func__, fcport->port_name, fcport->disc_state,
1484-
fcport->fw_login_state);
1485-
1486-
if (fcport->flags & FCF_ASYNC_SENT)
1487-
return;
1488-
1489-
switch (fcport->disc_state) {
1490-
case DSC_DELETED:
1491-
case DSC_LOGIN_COMPLETE:
1492-
qla24xx_post_gpnid_work(fcport->vha, &ea->id);
1493-
break;
1494-
default:
1495-
break;
1496-
}
1497-
}
1498-
14991476
int qla24xx_post_newsess_work(struct scsi_qla_host *vha, port_id_t *id,
15001477
u8 *port_name, u8 *node_name, void *pla, u8 fc4_type)
15011478
{
@@ -1562,8 +1539,6 @@ static void qla_handle_els_plogi_done(scsi_qla_host_t *vha,
15621539

15631540
void qla2x00_fcport_event_handler(scsi_qla_host_t *vha, struct event_arg *ea)
15641541
{
1565-
fc_port_t *f, *tf;
1566-
uint32_t id = 0, mask, rid;
15671542
fc_port_t *fcport;
15681543

15691544
switch (ea->event) {
@@ -1576,10 +1551,6 @@ void qla2x00_fcport_event_handler(scsi_qla_host_t *vha, struct event_arg *ea)
15761551
case FCME_RSCN:
15771552
if (test_bit(UNLOADING, &vha->dpc_flags))
15781553
return;
1579-
switch (ea->id.b.rsvd_1) {
1580-
case RSCN_PORT_ADDR:
1581-
#define BIGSCAN 1
1582-
#if defined BIGSCAN & BIGSCAN > 0
15831554
{
15841555
unsigned long flags;
15851556
fcport = qla2x00_find_fcport_by_nportid
@@ -1598,59 +1569,6 @@ void qla2x00_fcport_event_handler(scsi_qla_host_t *vha, struct event_arg *ea)
15981569
}
15991570
spin_unlock_irqrestore(&vha->work_lock, flags);
16001571
}
1601-
#else
1602-
{
1603-
int rc;
1604-
fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1);
1605-
if (!fcport) {
1606-
/* cable moved */
1607-
rc = qla24xx_post_gpnid_work(vha, &ea->id);
1608-
if (rc) {
1609-
ql_log(ql_log_warn, vha, 0xd044,
1610-
"RSCN GPNID work failed %06x\n",
1611-
ea->id.b24);
1612-
}
1613-
} else {
1614-
ea->fcport = fcport;
1615-
fcport->scan_needed = 1;
1616-
qla24xx_handle_rscn_event(fcport, ea);
1617-
}
1618-
}
1619-
#endif
1620-
break;
1621-
case RSCN_AREA_ADDR:
1622-
case RSCN_DOM_ADDR:
1623-
if (ea->id.b.rsvd_1 == RSCN_AREA_ADDR) {
1624-
mask = 0xffff00;
1625-
ql_dbg(ql_dbg_async, vha, 0x5044,
1626-
"RSCN: Area 0x%06x was affected\n",
1627-
ea->id.b24);
1628-
} else {
1629-
mask = 0xff0000;
1630-
ql_dbg(ql_dbg_async, vha, 0x507a,
1631-
"RSCN: Domain 0x%06x was affected\n",
1632-
ea->id.b24);
1633-
}
1634-
1635-
rid = ea->id.b24 & mask;
1636-
list_for_each_entry_safe(f, tf, &vha->vp_fcports,
1637-
list) {
1638-
id = f->d_id.b24 & mask;
1639-
if (rid == id) {
1640-
ea->fcport = f;
1641-
qla24xx_handle_rscn_event(f, ea);
1642-
}
1643-
}
1644-
break;
1645-
case RSCN_FAB_ADDR:
1646-
default:
1647-
ql_log(ql_log_warn, vha, 0xd045,
1648-
"RSCN: Fabric was affected. Addr format %d\n",
1649-
ea->id.b.rsvd_1);
1650-
qla2x00_mark_all_devices_lost(vha, 1);
1651-
set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
1652-
set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
1653-
}
16541572
break;
16551573
case FCME_GNL_DONE:
16561574
qla24xx_handle_gnl_done_event(vha, ea);
@@ -1711,11 +1629,7 @@ void qla_rscn_replay(fc_port_t *fcport)
17111629
ea.event = FCME_RSCN;
17121630
ea.id = fcport->d_id;
17131631
ea.id.b.rsvd_1 = RSCN_PORT_ADDR;
1714-
#if defined BIGSCAN & BIGSCAN > 0
17151632
qla2x00_fcport_event_handler(fcport->vha, &ea);
1716-
#else
1717-
qla24xx_post_gpnid_work(fcport->vha, &ea.id);
1718-
#endif
17191633
}
17201634
}
17211635

0 commit comments

Comments
 (0)