lkml.org 
[lkml]   [2020]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 044/129] bnxt_en: Fix PCI AER error recovery flow
    Date
    From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>

    [ Upstream commit df3875ec550396974b1d8a518bd120d034738236 ]

    When a PCI error is detected the PCI state could be corrupt, save
    the PCI state after initialization and restore it after the slot
    reset.

    Fixes: 6316ea6db93d ("bnxt_en: Enable AER support.")
    Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
    index 2cbfe0cd7eefa..7cb74d7a78e3c 100644
    --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
    +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
    @@ -11900,6 +11900,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
    (long)pci_resource_start(pdev, 0), dev->dev_addr);
    pcie_print_link_status(pdev);

    + pci_save_state(pdev);
    return 0;

    init_err_cleanup:
    @@ -12066,6 +12067,8 @@ static pci_ers_result_t bnxt_io_slot_reset(struct pci_dev *pdev)
    "Cannot re-enable PCI device after reset.\n");
    } else {
    pci_set_master(pdev);
    + pci_restore_state(pdev);
    + pci_save_state(pdev);

    err = bnxt_hwrm_func_reset(bp);
    if (!err && netif_running(netdev))
    --
    2.25.1


    \
     
     \ /
      Last update: 2020-09-08 17:50    [W:4.441 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site