]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: hns3: fix a wrong reset interrupt status mask
authorHuazhong Tan <tanhuazhong@huawei.com>
Wed, 20 Nov 2019 02:07:15 +0000 (10:07 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Nov 2019 03:09:53 +0000 (19:09 -0800)
According to hardware user manual, bits5~7 in register
HCLGE_MISC_VECTOR_INT_STS means reset interrupts status,
but HCLGE_RESET_INT_M is defined as bits0~2 now. So it
will make hclge_reset_err_handle() read the wrong reset
interrupt status.

This patch fixes this wrong bit mask.

Fixes: 2336f19d7892 ("net: hns3: check reset interrupt status when reset fails")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h

index 59b824347ba4d8d66b4941baa682a5da22f7cebc..615cde1cbf0b448f667e31449e14f2df065e656c 100644 (file)
@@ -166,7 +166,7 @@ enum HLCGE_PORT_TYPE {
 #define HCLGE_GLOBAL_RESET_BIT         0
 #define HCLGE_CORE_RESET_BIT           1
 #define HCLGE_IMP_RESET_BIT            2
-#define HCLGE_RESET_INT_M              GENMASK(2, 0)
+#define HCLGE_RESET_INT_M              GENMASK(7, 5)
 #define HCLGE_FUN_RST_ING              0x20C00
 #define HCLGE_FUN_RST_ING_B            0