Commit 0a6ce503 authored by Yanling Song's avatar Yanling Song Committed by Zheng Zengkai
Browse files

net/spnic:Remove the code of polling mode

Ramaxel inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4P01N


CVE: NA

Remove the code of polling mode
since the driver only use interrupt mode and not use poll mode.

Signed-off-by: default avatarYanling Song <songyl@ramaxel.com>
Reviewed-by: default avatarYang Gan <yanggan@ramaxel.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 6d921fa7
Loading
Loading
Loading
Loading
+4 −16
Original line number Diff line number Diff line
@@ -533,22 +533,10 @@ static int cmdq_ceq_handler_status(struct sphw_cmdq *cmdq,
{
	ulong timeo;
	int err;
	ulong start = 0;
	ulong end = timeout;

	if (cmdq->hwdev->poll) {
		while (start < end) {
			sphw_cmdq_ceq_handler(cmdq->hwdev, 0);
			if (saved_cmd_info->done->done != 0)
				return 0;
			usleep_range(900, 1000);
			start++;
		}
	} else {
	timeo = msecs_to_jiffies(timeout);
	if (wait_for_completion_timeout(saved_cmd_info->done, timeo))
		return 0;
	}

	spin_lock_bh(&cmdq->cmdq_lock);

+0 −2
Original line number Diff line number Diff line
@@ -335,8 +335,6 @@ struct sphw_init_para {
	 * need to trasmit message ppf mbox to bmgw arm host.
	 */
	void *ppf_hwdev;
	/* if use polling mode, set it true */
	bool poll;
};

/* B200 config BAR45 4MB, DB & DWQE both 2MB */
+1 −6
Original line number Diff line number Diff line
@@ -392,11 +392,6 @@ static void set_eq_cons_idx(struct sphw_eq *eq, u32 arm_state)
	u32 addr = EQ_CI_SIMPLE_INDIR_REG_ADDR(eq);

	eq_wrap_ci = EQ_CONS_IDX(eq);

	/* if use poll mode only eq0 use int_arm mode */
	if (eq->q_id != 0 && eq->hwdev->poll)
		val = EQ_CI_SIMPLE_INDIR_SET(SPHW_EQ_NOT_ARMED, ARMED);
	else
	val = EQ_CI_SIMPLE_INDIR_SET(arm_state, ARMED);
	if (eq->type == SPHW_AEQ) {
		val = val |
+0 −1
Original line number Diff line number Diff line
@@ -938,7 +938,6 @@ int sphw_init_hwdev(struct sphw_init_para *para)
	hwdev->pcidev_hdl = para->pcidev_hdl;
	hwdev->dev_hdl = para->dev_hdl;
	hwdev->chip_node = para->chip_node;
	hwdev->poll = para->poll;

	hwdev->chip_fault_stats = vzalloc(SPHW_CHIP_FAULT_SIZE);
	if (!hwdev->chip_fault_stats)
+0 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ struct sphw_hwdev {

	u32 wq_page_size;
	int chip_present_flag;
	bool poll;	   /*use polling mode or int mode*/

	struct sphw_hwif *hwif; /* include void __iomem *bar */
	struct comm_global_attr glb_attr;
Loading