mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
scsi: qla2xxx: Remove redundant check for fcport deletion
Remove redundant check for fcport is deleted or being delete. The same check is already in the deletion routine. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
cb873ba400
commit
050e0ced35
@ -3442,26 +3442,10 @@ void qla24xx_handle_gpnid_event(scsi_qla_host_t *vha, struct event_arg *ea)
|
|||||||
if (ea->rc) {
|
if (ea->rc) {
|
||||||
/* cable is disconnected */
|
/* cable is disconnected */
|
||||||
list_for_each_entry_safe(fcport, t, &vha->vp_fcports, list) {
|
list_for_each_entry_safe(fcport, t, &vha->vp_fcports, list) {
|
||||||
if (fcport->d_id.b24 == ea->id.b24) {
|
if (fcport->d_id.b24 == ea->id.b24)
|
||||||
ql_dbg(ql_dbg_disc, vha, 0xffff,
|
|
||||||
"%s %d %8phC DS %d\n",
|
|
||||||
__func__, __LINE__,
|
|
||||||
fcport->port_name,
|
|
||||||
fcport->disc_state);
|
|
||||||
fcport->scan_state = QLA_FCPORT_SCAN;
|
fcport->scan_state = QLA_FCPORT_SCAN;
|
||||||
switch (fcport->disc_state) {
|
|
||||||
case DSC_DELETED:
|
|
||||||
case DSC_DELETE_PEND:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ql_dbg(ql_dbg_disc, vha, 0xffff,
|
|
||||||
"%s %d %8phC post del sess\n",
|
|
||||||
__func__, __LINE__,
|
|
||||||
fcport->port_name);
|
|
||||||
qlt_schedule_sess_for_deletion(fcport);
|
qlt_schedule_sess_for_deletion(fcport);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* cable is connected */
|
/* cable is connected */
|
||||||
@ -3470,32 +3454,16 @@ void qla24xx_handle_gpnid_event(scsi_qla_host_t *vha, struct event_arg *ea)
|
|||||||
list_for_each_entry_safe(conflict, t, &vha->vp_fcports,
|
list_for_each_entry_safe(conflict, t, &vha->vp_fcports,
|
||||||
list) {
|
list) {
|
||||||
if ((conflict->d_id.b24 == ea->id.b24) &&
|
if ((conflict->d_id.b24 == ea->id.b24) &&
|
||||||
(fcport != conflict)) {
|
(fcport != conflict))
|
||||||
/* 2 fcports with conflict Nport ID or
|
/*
|
||||||
|
* 2 fcports with conflict Nport ID or
|
||||||
* an existing fcport is having nport ID
|
* an existing fcport is having nport ID
|
||||||
* conflict with new fcport.
|
* conflict with new fcport.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ql_dbg(ql_dbg_disc, vha, 0xffff,
|
|
||||||
"%s %d %8phC DS %d\n",
|
|
||||||
__func__, __LINE__,
|
|
||||||
conflict->port_name,
|
|
||||||
conflict->disc_state);
|
|
||||||
conflict->scan_state = QLA_FCPORT_SCAN;
|
conflict->scan_state = QLA_FCPORT_SCAN;
|
||||||
switch (conflict->disc_state) {
|
|
||||||
case DSC_DELETED:
|
qlt_schedule_sess_for_deletion(conflict);
|
||||||
case DSC_DELETE_PEND:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ql_dbg(ql_dbg_disc, vha, 0xffff,
|
|
||||||
"%s %d %8phC post del sess\n",
|
|
||||||
__func__, __LINE__,
|
|
||||||
conflict->port_name);
|
|
||||||
qlt_schedule_sess_for_deletion
|
|
||||||
(conflict);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fcport->rscn_gen++;
|
fcport->rscn_gen++;
|
||||||
@ -3548,19 +3516,7 @@ void qla24xx_handle_gpnid_event(scsi_qla_host_t *vha, struct event_arg *ea)
|
|||||||
conflict->disc_state);
|
conflict->disc_state);
|
||||||
|
|
||||||
conflict->scan_state = QLA_FCPORT_SCAN;
|
conflict->scan_state = QLA_FCPORT_SCAN;
|
||||||
switch (conflict->disc_state) {
|
qlt_schedule_sess_for_deletion(conflict);
|
||||||
case DSC_DELETED:
|
|
||||||
case DSC_DELETE_PEND:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ql_dbg(ql_dbg_disc, vha, 0xffff,
|
|
||||||
"%s %d %8phC post del sess\n",
|
|
||||||
__func__, __LINE__,
|
|
||||||
conflict->port_name);
|
|
||||||
qlt_schedule_sess_for_deletion
|
|
||||||
(conflict);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user