提交 0a6ce503 编写于 作者: Y Yanling Song 提交者: Zheng Zengkai

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: NYanling Song <songyl@ramaxel.com>
Reviewed-by: NYang Gan <yanggan@ramaxel.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 6d921fa7
......@@ -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;
}
timeo = msecs_to_jiffies(timeout);
if (wait_for_completion_timeout(saved_cmd_info->done, timeo))
return 0;
spin_lock_bh(&cmdq->cmdq_lock);
......
......@@ -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 */
......
......@@ -392,12 +392,7 @@ 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);
val = EQ_CI_SIMPLE_INDIR_SET(arm_state, ARMED);
if (eq->type == SPHW_AEQ) {
val = val |
EQ_CI_SIMPLE_INDIR_SET(eq_wrap_ci, CI) |
......
......@@ -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)
......
......@@ -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;
......
......@@ -1062,7 +1062,7 @@ static int send_mbox_msg(struct sphw_mbox *func_to_func, u8 mod, u16 cmd,
u8 *msg_seg = NULL;
u64 header = 0;
if (hwdev->poll || hwdev->hwif->attr.num_aeqs >= 2)
if (hwdev->hwif->attr.num_aeqs >= 2)
rsp_aeq_id = SPHW_MBOX_RSP_MSG_AEQ;
else
rsp_aeq_id = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册