You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
scsi: qla2xxx: Migrate switch registration commands away from mailbox interface
Migrate switch registration commands: RFTID, RFFID, RNNID and RSNN_NN out of mailbox interface to reduce fabric scan bottle neck. 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:
committed by
Martin K. Petersen
parent
2dee552102
commit
e374f9f592
@@ -535,6 +535,7 @@ typedef struct srb {
|
||||
u32 gen1; /* scratch */
|
||||
u32 gen2; /* scratch */
|
||||
int rc;
|
||||
int retry_count;
|
||||
struct completion comp;
|
||||
union {
|
||||
struct srb_iocb iocb_cmd;
|
||||
@@ -3187,7 +3188,7 @@ enum qla_work_type {
|
||||
QLA_EVT_AENFX,
|
||||
QLA_EVT_GIDPN,
|
||||
QLA_EVT_GPNID,
|
||||
QLA_EVT_GPNID_DONE,
|
||||
QLA_EVT_UNMAP,
|
||||
QLA_EVT_NEW_SESS,
|
||||
QLA_EVT_GPDB,
|
||||
QLA_EVT_PRLI,
|
||||
@@ -3203,6 +3204,7 @@ enum qla_work_type {
|
||||
QLA_EVT_GNNFT_DONE,
|
||||
QLA_EVT_GNNID,
|
||||
QLA_EVT_GFPNID,
|
||||
QLA_EVT_SP_RETRY,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -650,7 +650,6 @@ extern void qla2x00_free_fcport(fc_port_t *);
|
||||
|
||||
extern int qla24xx_post_gpnid_work(struct scsi_qla_host *, port_id_t *);
|
||||
extern int qla24xx_async_gpnid(scsi_qla_host_t *, port_id_t *);
|
||||
void qla24xx_async_gpnid_done(scsi_qla_host_t *, srb_t*);
|
||||
void qla24xx_handle_gpnid_event(scsi_qla_host_t *, struct event_arg *);
|
||||
|
||||
int qla24xx_post_gpsc_work(struct scsi_qla_host *, fc_port_t *);
|
||||
@@ -668,6 +667,7 @@ int qla24xx_post_gnnid_work(struct scsi_qla_host *, fc_port_t *);
|
||||
int qla24xx_post_gfpnid_work(struct scsi_qla_host *, fc_port_t *);
|
||||
int qla24xx_async_gfpnid(scsi_qla_host_t *, fc_port_t *);
|
||||
void qla24xx_handle_gfpnid_event(scsi_qla_host_t *, struct event_arg *);
|
||||
void qla24xx_sp_unmap(scsi_qla_host_t *, srb_t *);
|
||||
|
||||
/*
|
||||
* Global Function Prototypes in qla_attr.c source file.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4918,6 +4918,20 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e)
|
||||
}
|
||||
}
|
||||
|
||||
static void qla_sp_retry(struct scsi_qla_host *vha, struct qla_work_evt *e)
|
||||
{
|
||||
struct srb *sp = e->u.iosb.sp;
|
||||
int rval;
|
||||
|
||||
rval = qla2x00_start_sp(sp);
|
||||
if (rval != QLA_SUCCESS) {
|
||||
ql_dbg(ql_dbg_disc, vha, 0x2043,
|
||||
"%s: %s: Re-issue IOCB failed (%d).\n",
|
||||
__func__, sp->name, rval);
|
||||
qla24xx_sp_unmap(vha, sp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
qla2x00_do_work(struct scsi_qla_host *vha)
|
||||
{
|
||||
@@ -4971,8 +4985,8 @@ qla2x00_do_work(struct scsi_qla_host *vha)
|
||||
case QLA_EVT_GPNID:
|
||||
qla24xx_async_gpnid(vha, &e->u.gpnid.id);
|
||||
break;
|
||||
case QLA_EVT_GPNID_DONE:
|
||||
qla24xx_async_gpnid_done(vha, e->u.iosb.sp);
|
||||
case QLA_EVT_UNMAP:
|
||||
qla24xx_sp_unmap(vha, e->u.iosb.sp);
|
||||
break;
|
||||
case QLA_EVT_RELOGIN:
|
||||
qla2x00_relogin(vha);
|
||||
@@ -5021,6 +5035,8 @@ qla2x00_do_work(struct scsi_qla_host *vha)
|
||||
case QLA_EVT_GFPNID:
|
||||
qla24xx_async_gfpnid(vha, e->u.fcport.fcport);
|
||||
break;
|
||||
case QLA_EVT_SP_RETRY:
|
||||
qla_sp_retry(vha, e);
|
||||
}
|
||||
if (e->flags & QLA_EVT_FLAG_FREE)
|
||||
kfree(e);
|
||||
|
||||
@@ -6619,18 +6619,21 @@ qlt_vport_create(struct scsi_qla_host *vha, struct qla_hw_data *ha)
|
||||
qlt_add_target(ha, vha);
|
||||
}
|
||||
|
||||
void
|
||||
qlt_rff_id(struct scsi_qla_host *vha, struct ct_sns_req *ct_req)
|
||||
u8
|
||||
qlt_rff_id(struct scsi_qla_host *vha)
|
||||
{
|
||||
u8 fc4_feature = 0;
|
||||
/*
|
||||
* FC-4 Feature bit 0 indicates target functionality to the name server.
|
||||
*/
|
||||
if (qla_tgt_mode_enabled(vha)) {
|
||||
ct_req->req.rff_id.fc4_feature = BIT_0;
|
||||
fc4_feature = BIT_0;
|
||||
} else if (qla_ini_mode_enabled(vha)) {
|
||||
ct_req->req.rff_id.fc4_feature = BIT_1;
|
||||
fc4_feature = BIT_1;
|
||||
} else if (qla_dual_mode_enabled(vha))
|
||||
ct_req->req.rff_id.fc4_feature = BIT_0 | BIT_1;
|
||||
fc4_feature = BIT_0 | BIT_1;
|
||||
|
||||
return fc4_feature;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1072,7 +1072,7 @@ extern void qlt_free_cmd(struct qla_tgt_cmd *cmd);
|
||||
extern void qlt_async_event(uint16_t, struct scsi_qla_host *, uint16_t *);
|
||||
extern void qlt_enable_vha(struct scsi_qla_host *);
|
||||
extern void qlt_vport_create(struct scsi_qla_host *, struct qla_hw_data *);
|
||||
extern void qlt_rff_id(struct scsi_qla_host *, struct ct_sns_req *);
|
||||
extern u8 qlt_rff_id(struct scsi_qla_host *);
|
||||
extern void qlt_init_atio_q_entries(struct scsi_qla_host *);
|
||||
extern void qlt_24xx_process_atio_queue(struct scsi_qla_host *, uint8_t);
|
||||
extern void qlt_24xx_config_rings(struct scsi_qla_host *);
|
||||
|
||||
Reference in New Issue
Block a user