From: Huazhong Tan <hidden> Date: 2021-04-29 08:34:58
From: Yufeng Mo <redacted>
According to the UM, the type and enable status of igu_egu_hw_err
should be configured separately. Currently, the type field is
incorrect when disable this error. So fix it by configuring these
two fields separately.
Fixes: bf1faf9415dd ("net: hns3: Add enable and process hw errors from IGU, EGU and NCSI")
Signed-off-by: Yufeng Mo <redacted>
Signed-off-by: Huazhong Tan <redacted>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 3 ++-
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
From: Huazhong Tan <hidden> Date: 2021-04-29 08:35:00
From: Yufeng Mo <redacted>
The message sent to VF should be initialized, otherwise random
value of some contents may cause improper processing by the target.
So add a initialization to message in hclge_get_link_mode().
Fixes: 9194d18b0577 ("net: hns3: fix the problem that the supported port is empty")
Signed-off-by: Yufeng Mo <redacted>
Signed-off-by: Huazhong Tan <redacted>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Huazhong Tan <hidden> Date: 2021-04-29 08:35:02
From: Jian Shen <shenjian15@huawei.com>
In some cases, the device is not initialized because reset failed.
If another task calls hns3_reset_notify_up_enet() before reset
retry, it will cause an error since uninitialized pointer access.
So add check for HNS3_NIC_STATE_INITED before calling
hns3_nic_net_open() in hns3_reset_notify_up_enet().
Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <redacted>
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -4554,6 +4554,11 @@ static int hns3_reset_notify_up_enet(struct hnae3_handle *handle)structhns3_nic_priv*priv=netdev_priv(kinfo->netdev);intret=0;+if(!test_bit(HNS3_NIC_STATE_INITED,&priv->state)){+netdev_err(kinfo->netdev,"device is not initialized yet\n");+return-EFAULT;+}+clear_bit(HNS3_NIC_STATE_RESETTING,&priv->state);if(netif_running(kinfo->netdev)){
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Thu, 29 Apr 2021 16:34:49 +0800 you wrote:
This series adds some fixes for the HNS3 ethernet driver.
Jian Shen (1):
net: hns3: add check for HNS3_NIC_STATE_INITED in
hns3_reset_notify_up_enet()
Yufeng Mo (2):
net: hns3: fix incorrect configuration for igu_egu_hw_err
net: hns3: initialize the message content in hclge_get_link_mode()
[...]