From: Michael Chan Date: Wed, 8 Mar 2017 23:44:32 +0000 (-0500) Subject: bnxt_en: Perform function reset earlier during probe. X-Git-Tag: v4.1.12-106.0.20170710_2300~54 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=59dcbbbae378da5503f25ef59dea326fcb2364e6;p=users%2Fjedix%2Flinux-maple.git bnxt_en: Perform function reset earlier during probe. Orabug: 26402533, 26325599, 26366387 The firmware call to do function reset is done too late. It is causing the rings that have been reserved to be freed. In NPAR mode, this bug is causing us to run out of rings. Fixes: 391be5c27364 ("bnxt_en: Implement new scheme to reserve tx rings.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller (cherry picked from commit 3c2217a675bac22afb149166e0de71809189850d) Signed-off-by: Brian Maly Signed-off-by: Somasundaram Krishnasamy --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index bdb35c7b58169..574b5f72e51ad 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -7522,6 +7522,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (rc) goto init_err_pci_clean; + rc = bnxt_hwrm_func_reset(bp); + if (rc) + goto init_err_pci_clean; + bnxt_hwrm_fw_set_time(bp); dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_SG | @@ -7624,10 +7628,6 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (rc) goto init_err_pci_clean; - rc = bnxt_hwrm_func_reset(bp); - if (rc) - goto init_err_pci_clean; - rc = bnxt_init_int_mode(bp); if (rc) goto init_err_pci_clean;