Unverified Commit 153a05b7 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5770 v2 scsi: hisi_sas: Fixed some issues in the SAS

Merge Pull Request from: @ci-robot 
 
PR sync from: Yihang Li <liyihang9@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/FC7IJTYWFKOM2YNCUWGC3KNMOO3QF2D5/ 
This patchset includes 2 minor changes
- For interrupt coalescing, the count of CQ entries is set to 10, and the
  interrupt coalescing timeout period is set to 10us.
- Add cond_resched() to cq_thread_v3_hw() to execute the watchdog thread.

Changes since v1:
- Remove unnecessary comments.
- Update the commit message for patch 1.

Yihang Li (2):
  scsi: hisi_sas: Default enable interrupt coalescing
  scsi: hisi_sas: Add cond_resched() to cq_thread_v3_hw()


-- 
2.33.0
 
https://gitee.com/openeuler/kernel/issues/I9BBFQ 
 
Link:https://gitee.com/openeuler/kernel/pulls/5770

 

Reviewed-by: default avatarYihang Li <liyihang9@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 0b6927f0 6c932bdd
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -630,9 +630,9 @@ static void init_reg_v3_hw(struct hisi_hba *hisi_hba)
	hisi_sas_write32(hisi_hba, TRANS_LOCK_ICT_TIME, 0x4A817C80);
	hisi_sas_write32(hisi_hba, HGC_SAS_TXFAIL_RETRY_CTRL, 0x108);
	hisi_sas_write32(hisi_hba, CFG_AGING_TIME, 0x1);
	hisi_sas_write32(hisi_hba, INT_COAL_EN, 0x1);
	hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME, 0x1);
	hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT, 0x1);
	hisi_sas_write32(hisi_hba, INT_COAL_EN, 0x3);
	hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME, 0xa);
	hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT, 0xa);
	hisi_sas_write32(hisi_hba, CQ_INT_CONVERGE_EN,
			 hisi_sas_intr_conv);
	hisi_sas_write32(hisi_hba, OQ_INT_SRC, 0xffff);
@@ -2489,6 +2489,7 @@ static irqreturn_t cq_thread_v3_hw(int irq_no, void *p)
	/* update rd_point */
	cq->rd_point = rd_point;
	hisi_sas_write32(hisi_hba, COMPL_Q_0_RD_PTR + (0x14 * queue), rd_point);
	cond_resched();

	return IRQ_HANDLED;
}
@@ -2771,11 +2772,9 @@ static void config_intr_coal_v3_hw(struct hisi_hba *hisi_hba)

	if (hisi_hba->intr_coal_ticks == 0 ||
	    hisi_hba->intr_coal_count == 0) {
		hisi_sas_write32(hisi_hba, INT_COAL_EN, 0x1);
		hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME, 0x1);
		hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT, 0x1);
		hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME, 0xa);
		hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT, 0xa);
	} else {
		hisi_sas_write32(hisi_hba, INT_COAL_EN, 0x3);
		hisi_sas_write32(hisi_hba, OQ_INT_COAL_TIME,
				 hisi_hba->intr_coal_ticks);
		hisi_sas_write32(hisi_hba, OQ_INT_COAL_CNT,