mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 04:31:26 +00:00
qla2x00t-32gbit: Consolidate zio threshold setting for both FCP & NVMe
Consolidate zio threshold setting for both FCP & NVMe to prevent one protocol from clobbering the setting of the other protocol. Link: https://lore.kernel.org/r/20210329085229.4367-5-njavali@marvell.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> [ commit 5777fef788a59f5ac9ab6661988a95a045fc0574 upstream ] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9404 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -4754,7 +4754,6 @@ typedef struct scsi_qla_host {
|
||||
#define FX00_CRITEMP_RECOVERY 25
|
||||
#define FX00_HOST_INFO_RESEND 26
|
||||
#define QPAIR_ONLINE_CHECK_NEEDED 27
|
||||
#define SET_NVME_ZIO_THRESHOLD_NEEDED 28
|
||||
#define DETECT_SFP_CHANGE 29
|
||||
#define N2N_LOGIN_NEEDED 30
|
||||
#define IOCB_WORK_ACTIVE 31
|
||||
|
||||
@@ -7020,26 +7020,21 @@ intr_on_check:
|
||||
mutex_unlock(&ha->mq_lock);
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(SET_NVME_ZIO_THRESHOLD_NEEDED,
|
||||
&base_vha->dpc_flags)) {
|
||||
ql_log(ql_log_info, base_vha, 0xffffff,
|
||||
"nvme: SET ZIO Activity exchange threshold to %d.\n",
|
||||
ha->nvme_last_rptd_aen);
|
||||
if (qla27xx_set_zio_threshold(base_vha,
|
||||
ha->nvme_last_rptd_aen)) {
|
||||
ql_log(ql_log_info, base_vha, 0xffffff,
|
||||
"nvme: Unable to SET ZIO Activity exchange threshold to %d.\n",
|
||||
ha->nvme_last_rptd_aen);
|
||||
}
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(SET_ZIO_THRESHOLD_NEEDED,
|
||||
&base_vha->dpc_flags)) {
|
||||
&base_vha->dpc_flags)) {
|
||||
u16 threshold = ha->nvme_last_rptd_aen + ha->last_zio_threshold;
|
||||
|
||||
if (threshold > ha->orig_fw_xcb_count)
|
||||
threshold = ha->orig_fw_xcb_count;
|
||||
|
||||
ql_log(ql_log_info, base_vha, 0xffffff,
|
||||
"SET ZIO Activity exchange threshold to %d.\n",
|
||||
ha->last_zio_threshold);
|
||||
qla27xx_set_zio_threshold(base_vha,
|
||||
ha->last_zio_threshold);
|
||||
"SET ZIO Activity exchange threshold to %d.\n",
|
||||
threshold);
|
||||
if (qla27xx_set_zio_threshold(base_vha, threshold)) {
|
||||
ql_log(ql_log_info, base_vha, 0xffffff,
|
||||
"Unable to SET ZIO Activity exchange threshold to %d.\n",
|
||||
threshold);
|
||||
}
|
||||
}
|
||||
|
||||
if (!IS_QLAFX00(ha))
|
||||
@@ -7269,14 +7264,13 @@ qla2x00_timer(struct timer_list *t)
|
||||
index = atomic_read(&ha->nvme_active_aen_cnt);
|
||||
if (!vha->vp_idx &&
|
||||
(index != ha->nvme_last_rptd_aen) &&
|
||||
(index >= DEFAULT_ZIO_THRESHOLD) &&
|
||||
ha->zio_mode == QLA_ZIO_MODE_6 &&
|
||||
!ha->flags.host_shutting_down) {
|
||||
ha->nvme_last_rptd_aen = atomic_read(&ha->nvme_active_aen_cnt);
|
||||
ql_log(ql_log_info, vha, 0x3002,
|
||||
"nvme: Sched: Set ZIO exchange threshold to %d.\n",
|
||||
ha->nvme_last_rptd_aen);
|
||||
ha->nvme_last_rptd_aen = atomic_read(&ha->nvme_active_aen_cnt);
|
||||
set_bit(SET_NVME_ZIO_THRESHOLD_NEEDED, &vha->dpc_flags);
|
||||
set_bit(SET_ZIO_THRESHOLD_NEEDED, &vha->dpc_flags);
|
||||
start_dpc++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user