diff options
author | Vasundhara Volam <vasundhara-v.volam@broadcom.com> | 2019-11-23 22:30:42 -0500 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-11-24 14:48:02 -0800 |
commit | f92335d830059f3f9db950f0af49405d287924d5 (patch) | |
tree | f605d55e50104235df8a747331e45191f7e885db /drivers/net/ethernet/broadcom | |
parent | 2e882468fce263afef4a77ea4fe40808baaddae7 (diff) | |
download | linux-f92335d830059f3f9db950f0af49405d287924d5.tar.bz2 |
bnxt_en: Send FUNC_RESOURCE_QCAPS command in bnxt_resume()
After driver unregister, firmware is erasing the information that
driver supports new resource management. Send FUNC_RESOURCE_QCAPS
command to inform the firmware that driver supports new resource
management while resuming from hibernation. Otherwise, we fallback
to the older resource allocation scheme.
Also, move driver register after sending FUNC_RESOURCE_QCAPS command
to be consistent with the normal initialization sequence.
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index f627741ef585..69d7ab1d01db 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -11934,8 +11934,7 @@ static int bnxt_resume(struct device *device) goto resume_exit; } pci_set_master(bp->pdev); - if (bnxt_hwrm_ver_get(bp) || - bnxt_hwrm_func_drv_rgtr(bp, NULL, 0, false)) { + if (bnxt_hwrm_ver_get(bp)) { rc = -ENODEV; goto resume_exit; } @@ -11944,6 +11943,15 @@ static int bnxt_resume(struct device *device) rc = -EBUSY; goto resume_exit; } + + if (BNXT_NEW_RM(bp)) + bnxt_hwrm_func_resc_qcaps(bp, false); + + if (bnxt_hwrm_func_drv_rgtr(bp, NULL, 0, false)) { + rc = -ENODEV; + goto resume_exit; + } + bnxt_get_wol_settings(bp); if (netif_running(dev)) { rc = bnxt_open(dev); |