net: hns3: delay and separate enabling of NIC and ROCE HW errors
authorWeihang Li <liweihang@hisilicon.com>
Mon, 3 Jun 2019 02:09:22 +0000 (10:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Jun 2019 22:32:50 +0000 (15:32 -0700)
commit00ea6e5fda9d2be1c6af50aa4ebdeecc3149a758
tree51d71d6a9454a18297d239659ed42efdfa56eeaf
parent7832f0bd9fa4bd2224be2f8be854315119523df1
net: hns3: delay and separate enabling of NIC and ROCE HW errors

All RAS and MSI-X should be enabled just in the final stage of HNS3
initialization. It means that they should be enabled in
hclge_init_xxx_client_instance instead of hclge_ae_dev(). Especially
MSI-X, if it is enabled before opening vector0 IRQ, there are some
chances that a MSI-X error will cause failure on initialization of
 NIC client instane. So this patch delays enabling of HW errors.
Otherwise, we also separate enabling of ROCE RAS from NIC, because
it's not reasonable to enable ROCE RAS if we even don't have a ROCE
driver.

Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c