From: Yanling Song songyl@ramaxel.com
Ramaxel inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4TPKM CVE: NA
-----------------------------------------------
Reduce the timeout of the channel between driver and firmware
Signed-off-by: Yanling Song songyl@ramaxel.com Reviewed-by: wenliang wenliang@ramaxel.com Acked-by: Xie XiuQi xiexiuqi@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- drivers/net/ethernet/ramaxel/spnic/hw/sphw_cmdq.c | 2 +- drivers/net/ethernet/ramaxel/spnic/hw/sphw_mbox.c | 4 ++-- drivers/net/ethernet/ramaxel/spnic/hw/sphw_mgmt.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/ramaxel/spnic/hw/sphw_cmdq.c b/drivers/net/ethernet/ramaxel/spnic/hw/sphw_cmdq.c index 5421b813d484..9ebff6f8ac97 100644 --- a/drivers/net/ethernet/ramaxel/spnic/hw/sphw_cmdq.c +++ b/drivers/net/ethernet/ramaxel/spnic/hw/sphw_cmdq.c @@ -30,7 +30,7 @@ #define SPHW_CMDQ_MAX_DATA_SIZE \ (SPHW_CMDQ_BUF_SIZE - SPHW_CMDQ_BUF_HW_RSVD)
-#define CMDQ_CMD_TIMEOUT 300000 /* millisecond */ +#define CMDQ_CMD_TIMEOUT 5000 /* millisecond */
#define UPPER_8_BITS(data) (((data) >> 8) & 0xFF) #define LOWER_8_BITS(data) ((data) & 0xFF) diff --git a/drivers/net/ethernet/ramaxel/spnic/hw/sphw_mbox.c b/drivers/net/ethernet/ramaxel/spnic/hw/sphw_mbox.c index 7631b17a2944..694463ca0a93 100644 --- a/drivers/net/ethernet/ramaxel/spnic/hw/sphw_mbox.c +++ b/drivers/net/ethernet/ramaxel/spnic/hw/sphw_mbox.c @@ -61,8 +61,8 @@ enum sphw_mbox_tx_status {
#define MBOX_SEGLEN_MASK SPHW_MSG_HEADER_SET(SPHW_MSG_HEADER_SEG_LEN_MASK, SEG_LEN)
-#define MBOX_MSG_POLLING_TIMEOUT 300000 -#define SPHW_MBOX_COMP_TIME 300000U +#define MBOX_MSG_POLLING_TIMEOUT 8000 +#define SPHW_MBOX_COMP_TIME 25000U
#define MBOX_MAX_BUF_SZ 2048U #define MBOX_HEADER_SZ 8 diff --git a/drivers/net/ethernet/ramaxel/spnic/hw/sphw_mgmt.c b/drivers/net/ethernet/ramaxel/spnic/hw/sphw_mgmt.c index 01e88535a0ab..a66f40635963 100644 --- a/drivers/net/ethernet/ramaxel/spnic/hw/sphw_mgmt.c +++ b/drivers/net/ethernet/ramaxel/spnic/hw/sphw_mgmt.c @@ -50,7 +50,7 @@
#define MSG_NO_RESP 0xFFFF
-#define MGMT_MSG_TIMEOUT 300000 /* millisecond */ +#define MGMT_MSG_TIMEOUT 20000 /* millisecond */
#define SYNC_MSG_ID(pf_to_mgmt) ((pf_to_mgmt)->sync_msg_id)