Unverified Commit 6d9d4951 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3940 net: hns3: fix the cmdq reset command times out when all VFs are enabled...

!3940 net: hns3: fix the cmdq reset command times out when all VFs are enabled and the queue is full.

Merge Pull Request from: @svishen 
 
This pr fixed the problem that the function resets when all VFs are enabled and the queue is full.

The cmdq reset command times out when all VFs are enabled and
the queue is full. The hardware processing time exceeds the
timeout set by the driver. In order to avoid the above
extreme situations, the driver extends the reset timeout
to 1 second.

issue:
https://gitee.com/openeuler/kernel/issues/I8UVW2 
 
Link:https://gitee.com/openeuler/kernel/pulls/3940

 

Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 67852ec0 d4784d04
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ static int hclge_comm_cmd_csq_done(struct hclge_comm_hw *hw)
static u32 hclge_get_cmdq_tx_timeout(u16 opcode, u32 tx_timeout)
{
	static const struct hclge_cmdq_tx_timeout_map cmdq_tx_timeout_map[] = {
		{HCLGE_OPC_CFG_RST_TRIGGER, HCLGE_COMM_CMDQ_TX_TIMEOUT_500MS},
		{HCLGE_OPC_CFG_RST_TRIGGER, HCLGE_COMM_CMDQ_CFG_RST_TIMEOUT},
	};
	u32 i;

+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
#define HCLGE_COMM_NIC_CMQ_DESC_NUM_S		3
#define HCLGE_COMM_NIC_CMQ_DESC_NUM		1024
#define HCLGE_COMM_CMDQ_TX_TIMEOUT_DEFAULT	30000
#define HCLGE_COMM_CMDQ_TX_TIMEOUT_500MS	500000
#define HCLGE_COMM_CMDQ_CFG_RST_TIMEOUT		1000000

enum hclge_opcode_type {
	/* Generic commands */