scsi: qla2xxx: Remove dead code
Removing drport field and FCPORT_UPDATE_NEEDED signals. Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
8fe66badf0
commit
efd1bd12a0
|
@ -2732,7 +2732,7 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
|
|||
spin_lock_irqsave(host->host_lock, flags);
|
||||
/* Confirm port has not reappeared before clearing pointers. */
|
||||
if (rport->port_state != FC_PORTSTATE_ONLINE) {
|
||||
fcport->rport = fcport->drport = NULL;
|
||||
fcport->rport = NULL;
|
||||
*((fc_port_t **)rport->dd_data) = NULL;
|
||||
}
|
||||
spin_unlock_irqrestore(host->host_lock, flags);
|
||||
|
@ -3171,8 +3171,7 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
|
|||
|
||||
set_bit(VPORT_DELETE, &vha->dpc_flags);
|
||||
|
||||
while (test_bit(LOOP_RESYNC_ACTIVE, &vha->dpc_flags) ||
|
||||
test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags))
|
||||
while (test_bit(LOOP_RESYNC_ACTIVE, &vha->dpc_flags))
|
||||
msleep(1000);
|
||||
|
||||
|
||||
|
|
|
@ -2596,7 +2596,7 @@ typedef struct fc_port {
|
|||
|
||||
int login_retry;
|
||||
|
||||
struct fc_rport *rport, *drport;
|
||||
struct fc_rport *rport;
|
||||
u32 supported_classes;
|
||||
|
||||
uint8_t fc4_type;
|
||||
|
@ -4876,7 +4876,6 @@ typedef struct scsi_qla_host {
|
|||
#define ISP_ABORT_RETRY 10 /* ISP aborted. */
|
||||
#define BEACON_BLINK_NEEDED 11
|
||||
#define REGISTER_FDMI_NEEDED 12
|
||||
#define FCPORT_UPDATE_NEEDED 13
|
||||
#define VP_DPC_NEEDED 14 /* wake up for VP dpc handling */
|
||||
#define UNLOADING 15
|
||||
#define NPIV_CONFIG_NEEDED 16
|
||||
|
|
|
@ -5224,27 +5224,6 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)
|
|||
return (rval);
|
||||
}
|
||||
|
||||
static void
|
||||
qla2x00_rport_del(void *data)
|
||||
{
|
||||
fc_port_t *fcport = data;
|
||||
struct fc_rport *rport;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(fcport->vha->host->host_lock, flags);
|
||||
rport = fcport->drport ? fcport->drport : fcport->rport;
|
||||
fcport->drport = NULL;
|
||||
spin_unlock_irqrestore(fcport->vha->host->host_lock, flags);
|
||||
if (rport) {
|
||||
ql_dbg(ql_dbg_disc, fcport->vha, 0x210b,
|
||||
"%s %8phN. rport %p roles %x\n",
|
||||
__func__, fcport->port_name, rport,
|
||||
rport->roles);
|
||||
|
||||
fc_remote_port_delete(rport);
|
||||
}
|
||||
}
|
||||
|
||||
void qla2x00_set_fcport_state(fc_port_t *fcport, int state)
|
||||
{
|
||||
int old_state;
|
||||
|
@ -6761,33 +6740,6 @@ int qla2x00_perform_loop_resync(scsi_qla_host_t *ha)
|
|||
return rval;
|
||||
}
|
||||
|
||||
void
|
||||
qla2x00_update_fcports(scsi_qla_host_t *base_vha)
|
||||
{
|
||||
fc_port_t *fcport;
|
||||
struct scsi_qla_host *vha, *tvp;
|
||||
struct qla_hw_data *ha = base_vha->hw;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&ha->vport_slock, flags);
|
||||
/* Go with deferred removal of rport references. */
|
||||
list_for_each_entry_safe(vha, tvp, &base_vha->hw->vp_list, list) {
|
||||
atomic_inc(&vha->vref_count);
|
||||
list_for_each_entry(fcport, &vha->vp_fcports, list) {
|
||||
if (fcport->drport &&
|
||||
atomic_read(&fcport->state) != FCS_UNCONFIGURED) {
|
||||
spin_unlock_irqrestore(&ha->vport_slock, flags);
|
||||
qla2x00_rport_del(fcport);
|
||||
|
||||
spin_lock_irqsave(&ha->vport_slock, flags);
|
||||
}
|
||||
}
|
||||
atomic_dec(&vha->vref_count);
|
||||
wake_up(&vha->vref_waitq);
|
||||
}
|
||||
spin_unlock_irqrestore(&ha->vport_slock, flags);
|
||||
}
|
||||
|
||||
/* Assumes idc_lock always held on entry */
|
||||
void
|
||||
qla83xx_reset_ownership(scsi_qla_host_t *vha)
|
||||
|
|
|
@ -384,15 +384,6 @@ qla2x00_do_dpc_vp(scsi_qla_host_t *vha)
|
|||
}
|
||||
}
|
||||
|
||||
if (test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) {
|
||||
ql_dbg(ql_dbg_dpc, vha, 0x4016,
|
||||
"FCPort update scheduled.\n");
|
||||
qla2x00_update_fcports(vha);
|
||||
clear_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags);
|
||||
ql_dbg(ql_dbg_dpc, vha, 0x4017,
|
||||
"FCPort update end.\n");
|
||||
}
|
||||
|
||||
if (test_bit(RELOGIN_NEEDED, &vha->dpc_flags) &&
|
||||
!test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags) &&
|
||||
atomic_read(&vha->loop_state) != LOOP_DOWN) {
|
||||
|
|
|
@ -7025,11 +7025,6 @@ qla2x00_do_dpc(void *data)
|
|||
}
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(FCPORT_UPDATE_NEEDED,
|
||||
&base_vha->dpc_flags)) {
|
||||
qla2x00_update_fcports(base_vha);
|
||||
}
|
||||
|
||||
if (IS_QLAFX00(ha))
|
||||
goto loop_resync_check;
|
||||
|
||||
|
@ -7525,7 +7520,6 @@ qla2x00_timer(struct timer_list *t)
|
|||
/* Schedule the DPC routine if needed */
|
||||
if ((test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) ||
|
||||
test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags) ||
|
||||
test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags) ||
|
||||
start_dpc ||
|
||||
test_bit(RESET_MARKER_NEEDED, &vha->dpc_flags) ||
|
||||
test_bit(BEACON_BLINK_NEEDED, &vha->dpc_flags) ||
|
||||
|
@ -7536,13 +7530,10 @@ qla2x00_timer(struct timer_list *t)
|
|||
test_bit(PROCESS_PUREX_IOCB, &vha->dpc_flags))) {
|
||||
ql_dbg(ql_dbg_timer, vha, 0x600b,
|
||||
"isp_abort_needed=%d loop_resync_needed=%d "
|
||||
"fcport_update_needed=%d start_dpc=%d "
|
||||
"reset_marker_needed=%d",
|
||||
"start_dpc=%d reset_marker_needed=%d",
|
||||
test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags),
|
||||
test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags),
|
||||
test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags),
|
||||
start_dpc,
|
||||
test_bit(RESET_MARKER_NEEDED, &vha->dpc_flags));
|
||||
start_dpc, test_bit(RESET_MARKER_NEEDED, &vha->dpc_flags));
|
||||
ql_dbg(ql_dbg_timer, vha, 0x600c,
|
||||
"beacon_blink_needed=%d isp_unrecoverable=%d "
|
||||
"fcoe_ctx_reset_needed=%d vp_dpc_needed=%d "
|
||||
|
|
Loading…
Reference in New Issue