Skip to content

Commit 1763c1f

Browse files
Darren Trappmartinkpetersen
authored andcommitted
scsi: qla2xxx: Fix n2n_ae flag to prevent dev_loss on PDB change
On a port db changes, this patch will set n2n_ae flag for N2N connection when requesting for Report ID Acquition MBX, instead of Loop Initialization or point to point asynchronous events. Signed-off-by: Darren Trapp <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e473b30 commit 1763c1f

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

drivers/scsi/qla2xxx/qla_def.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4281,8 +4281,6 @@ typedef struct scsi_qla_host {
42814281
struct nvme_fc_local_port *nvme_local_port;
42824282
struct completion nvme_del_done;
42834283
struct list_head nvme_rport_list;
4284-
atomic_t nvme_active_aen_cnt;
4285-
uint16_t nvme_last_rptd_aen;
42864284

42874285
uint16_t fcoe_vlan_id;
42884286
uint16_t fcoe_fcf_idx;

drivers/scsi/qla2xxx/qla_isr.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
767767

768768
case MBA_LIP_OCCURRED: /* Loop Initialization Procedure */
769769
ha->flags.lip_ae = 1;
770-
ha->flags.n2n_ae = 0;
771770

772771
ql_dbg(ql_dbg_async, vha, 0x5009,
773772
"LIP occurred (%x).\n", mb[1]);
@@ -811,7 +810,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
811810

812811
case MBA_LOOP_DOWN: /* Loop Down Event */
813812
SAVE_TOPO(ha);
814-
ha->flags.n2n_ae = 0;
815813
ha->flags.lip_ae = 0;
816814
ha->current_topology = 0;
817815

@@ -885,7 +883,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
885883
/* case MBA_DCBX_COMPLETE: */
886884
case MBA_POINT_TO_POINT: /* Point-to-Point */
887885
ha->flags.lip_ae = 0;
888-
ha->flags.n2n_ae = 1;
889886

890887
if (IS_QLA2100(ha))
891888
break;

drivers/scsi/qla2xxx/qla_mbx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3747,6 +3747,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
37473747
id.b.area = rptid_entry->port_id[1];
37483748
id.b.al_pa = rptid_entry->port_id[0];
37493749
id.b.rsvd_1 = 0;
3750+
ha->flags.n2n_ae = 0;
37503751

37513752
if (rptid_entry->format == 0) {
37523753
/* loop */
@@ -3799,6 +3800,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
37993800
set_bit(N2N_LOGIN_NEEDED, &vha->dpc_flags);
38003801
set_bit(REGISTER_FC4_NEEDED, &vha->dpc_flags);
38013802
set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags);
3803+
ha->flags.n2n_ae = 1;
38023804
return;
38033805
}
38043806

@@ -3875,6 +3877,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
38753877
vha->d_id.b.area = rptid_entry->port_id[1];
38763878
vha->d_id.b.al_pa = rptid_entry->port_id[0];
38773879

3880+
ha->flags.n2n_ae = 1;
38783881
spin_lock_irqsave(&ha->vport_slock, flags);
38793882
qlt_update_vp_map(vha, SET_AL_PA);
38803883
spin_unlock_irqrestore(&ha->vport_slock, flags);

0 commit comments

Comments
 (0)