Commit 430eef03 authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen
Browse files

scsi: qla2xxx: Relocate/rename vp map



There is no functional change in this patch.  VP map resource is renamed
and relocated so it is not viewed as just a target mode resource.

Signed-off-by: default avatarQuinn Tran <qutran@marvell.com>
Signed-off-by: default avatarNilesh Javali <njavali@marvell.com>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 87f6dafd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3935,7 +3935,6 @@ struct qlt_hw_data {
	__le32 __iomem *atio_q_out;

	const struct qla_tgt_func_tmpl *tgt_ops;
	struct qla_tgt_vp_map *tgt_vp_map;

	int saved_set;
	__le16	saved_exchange_count;
@@ -4759,6 +4758,7 @@ struct qla_hw_data {
	spinlock_t sadb_lock;	/* protects list */
	struct els_reject elsrej;
	u8 edif_post_stop_cnt_down;
	struct qla_vp_map *vp_map;
};

#define RX_ELS_SIZE (roundup(sizeof(struct enode) + ELS_MAX_PAYLOAD, SMP_CACHE_BYTES))
@@ -5059,7 +5059,7 @@ struct qla27xx_image_status {
#define SET_AL_PA	2
#define RESET_VP_IDX	3
#define RESET_AL_PA	4
struct qla_tgt_vp_map {
struct qla_vp_map {
	uint8_t	idx;
	scsi_qla_host_t *vha;
};
+2 −0
Original line number Diff line number Diff line
@@ -145,4 +145,6 @@ struct enode {
	(qla_ini_mode_enabled(_s->vha) && (_s->disc_state == DSC_DELETE_PEND || \
	 _s->disc_state == DSC_DELETED))

#define EDIF_CAP(_ha) (ql2xsecenable && IS_QLA28XX(_ha))

#endif	/* __QLA_EDIF_H */
+4 −1
Original line number Diff line number Diff line
@@ -257,6 +257,7 @@ struct edif_sa_ctl *qla_edif_find_sa_ctl_by_index(fc_port_t *fcport,
/*
 * Global Functions in qla_mid.c source file.
 */
extern void qla_update_vp_map(struct scsi_qla_host *, int);
extern struct scsi_host_template qla2xxx_driver_template;
extern struct scsi_transport_template *qla2xxx_transport_vport_template;
extern void qla2x00_timer(struct timer_list *);
@@ -955,7 +956,7 @@ extern struct fc_port *qlt_find_sess_invalidate_other(scsi_qla_host_t *,
	uint64_t wwn, port_id_t port_id, uint16_t loop_id, struct fc_port **);
void qla24xx_delete_sess_fn(struct work_struct *);
void qlt_unknown_atio_work_fn(struct work_struct *);
void qlt_update_host_map(struct scsi_qla_host *, port_id_t);
void qla_update_host_map(struct scsi_qla_host *, port_id_t);
void qla_remove_hostmap(struct qla_hw_data *ha);
void qlt_clr_qp_table(struct scsi_qla_host *vha);
void qlt_set_mode(struct scsi_qla_host *);
@@ -968,6 +969,8 @@ extern void qla_nvme_abort_set_option
		(struct abort_entry_24xx *abt, srb_t *sp);
extern void qla_nvme_abort_process_comp_status
		(struct abort_entry_24xx *abt, srb_t *sp);
struct scsi_qla_host *qla_find_host_by_vp_idx(struct scsi_qla_host *vha,
	uint16_t vp_idx);

/* nvme.c */
void qla_nvme_unregister_remote_port(struct fc_port *fcport);
+2 −2
Original line number Diff line number Diff line
@@ -4822,9 +4822,9 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
	spin_lock_irqsave(&ha->hardware_lock, flags);
	if (vha->hw->flags.edif_enabled) {
		if (topo != 2)
			qlt_update_host_map(vha, id);
			qla_update_host_map(vha, id);
	} else if (!(topo == 2 && ha->flags.n2n_bigger))
		qlt_update_host_map(vha, id);
		qla_update_host_map(vha, id);
	spin_unlock_irqrestore(&ha->hardware_lock, flags);

	if (!vha->flags.init_done)
+4 −4
Original line number Diff line number Diff line
@@ -4010,7 +4010,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
		    rptid_entry->port_id[2], rptid_entry->port_id[1],
		    rptid_entry->port_id[0]);
		ha->current_topology = ISP_CFG_NL;
		qlt_update_host_map(vha, id);
		qla_update_host_map(vha, id);

	} else if (rptid_entry->format == 1) {
		/* fabric */
@@ -4126,7 +4126,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
					    WWN_SIZE);
				}

				qlt_update_host_map(vha, id);
				qla_update_host_map(vha, id);
			}

			set_bit(REGISTER_FC4_NEEDED, &vha->dpc_flags);
@@ -4153,7 +4153,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
			if (!found)
				return;

			qlt_update_host_map(vp, id);
			qla_update_host_map(vp, id);

			/*
			 * Cannot configure here as we are still sitting on the
@@ -4184,7 +4184,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,

		ha->flags.n2n_ae = 1;
		spin_lock_irqsave(&ha->vport_slock, flags);
		qlt_update_vp_map(vha, SET_AL_PA);
		qla_update_vp_map(vha, SET_AL_PA);
		spin_unlock_irqrestore(&ha->vport_slock, flags);

		list_for_each_entry(fcport, &vha->vp_fcports, list) {
Loading