summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
diff options
context:
space:
mode:
authorShiju Jose <shiju.jose@huawei.com>2019-06-13 17:12:23 +0800
committerDavid S. Miller <davem@davemloft.net>2019-06-14 19:26:15 -0700
commite4193e24a52016d9088e796c313f6eb3c9c540e0 (patch)
tree3e158ea4f6e52b9fb87153e6587f336e3860f933 /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
parenta955d71df26c43337ca0ab8f9279d54715cd601f (diff)
net: hns3: process H/W errors occurred before HNS dev initialization
Presently the HNS driver enables the HNS H/W error interrupts after the dev initialization is completed. However some exceptions such as NCSI errors can occur when the network port driver is not loaded and those errors required reporting to the BMC. Therefore the firmware enabled all the HNS ras error interrupts before the driver is loaded. And in some cases, there will be some H/W errors remained unclear before reboot. Thus the HNS driver needs to process and recover those hw errors occurred before HNS driver is initialized. This patch adds processing of the HNS hw errors(RAS and MSI-X) which occurred before the driver initialization. For RAS, because they are enabled by firmware, so we can detect specific bits, then log and clear them. But for MSI-X which can not be enabled before open vector0 irq, we can't detect the specific error bits, so we just write 1 to all interrupt source registers to clear. Signed-off-by: Shiju Jose <shiju.jose@huawei.com> 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>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
index be1186a3c345..d821a76db140 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h
@@ -123,6 +123,7 @@ struct hclge_hw_error {
int hclge_config_mac_tnl_int(struct hclge_dev *hdev, bool en);
int hclge_config_nic_hw_error(struct hclge_dev *hdev, bool state);
int hclge_config_rocee_ras_interrupt(struct hclge_dev *hdev, bool en);
+void hclge_handle_all_hns_hw_errors(struct hnae3_ae_dev *ae_dev);
pci_ers_result_t hclge_handle_hw_ras_error(struct hnae3_ae_dev *ae_dev);
int hclge_handle_hw_msix_error(struct hclge_dev *hdev,
unsigned long *reset_requests);