bnxt_en: Bug fixes.
Michael Chan
maintainercover bnxt_en: Bug fixes.
This series has 2 fixes. The first one fixes a resource accounting error with the RDMA driver loaded and the second one fixes the firmware flashing sequence after defragmentation.
Please queue the 1st one for -stable. Thanks.
Michael Chan (1):
bnxt_en: Improve stats context resource accounting with RDMA driver
loaded.
Pavan Chebbi (1):
bnxt_en: Clear DEFRAG flag in firmware message when retry flashing.
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 ++- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 1/2 bnxt_en: Improve stats context resource accounting with RDMA driver loaded.
The function bnxt_get_ulp_stat_ctxs() does not count the stats contexts used by the RDMA driver correctly when the RDMA driver is freeing the MSIX vectors. It assumes that if the RDMA driver is registered, the additional stats contexts will be needed. This is not true when the RDMA driver is about to unregister and frees the MSIX vectors.
This slight error leads to over accouting of the stats contexts needed after the RDMA driver has unloaded. This will cause some firmware warning and error messages in dmesg during subsequent config. changes or ifdown/ifup.
Fix it by properly accouting for extra stats contexts only if the RDMA driver is registered and MSIX vectors have been successfully requested.
--- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +6 -2
@@ -222,8 +222,12 @@ int bnxt_get_ulp_msix_base(struct bnxt *bp)int bnxt_get_ulp_stat_ctxs (struct bnxt *bp) { -if (bnxt_ulp_registered (bp->edev,BNXT_ROCE_ULP )) -return BNXT_MIN_ROCE_STAT_CTXS ; +if (bnxt_ulp_registered (bp->edev,BNXT_ROCE_ULP )) { +struct bnxt_en_dev *edev = bp->edev; + +if (edev->ulp_tbl[BNXT_ROCE_ULP ].msix_requested) +return BNXT_MIN_ROCE_STAT_CTXS ; + }return 0 ; }
Signature · 1 line
2.18.1
Michael Chan
maintainerPATCH 2/2 bnxt_en: Clear DEFRAG flag in firmware message when retry flashing.
In reply to Michael ChanFrom: Pavan Chebbi <[email protected]>
When the FW tells the driver to retry the INSTALL_UPDATE command after it has cleared the NVM area, the driver is not clearing the previously used ALLOWED_TO_DEFRAG flag. As a result the FW tries to defrag the NVM area a second time in a loop and can fail the request.
--- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +2 -1
@@ -2532,7 +2532,7 @@ int bnxt_flash_package_from_fw_obj(struct net_device *dev, const struct firmwareif (rc && ((struct hwrm_err_output *)&resp)->cmd_err ==NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR ) { - install.flags |= + install.flags =cpu_to_le16 (NVM_INSTALL_UPDATE_REQ_FLAGS_ALLOWED_TO_DEFRAG ); rc = _hwrm_send_message_silent(bp, &install,
@@ -2546,6 +2546,7 @@ int bnxt_flash_package_from_fw_obj(struct net_device *dev, const struct firmware* UPDATE directory and try the flash again */ defrag_attempted = true; + install.flags =0 ; rc = __bnxt_flash_nvram(bp->dev, BNX_DIR_TYPE_UPDATE, BNX_DIR_ORDINAL_FIRST,
Signature · 1 line
2.18.1
This series was applied to netdev/net.git (refs/heads/master):
Hello:
This series was applied to netdev/net.git (refs/heads/master):
Quoted 11 lines · On Mon, 11 Jan 2021 04:26:38 -0500 you wrote:
This series has 2 fixes. The first one fixes a resource accounting error with the RDMA driver loaded and the second one fixes the firmware flashing sequence after defragmentation.
Please queue the 1st one for -stable. Thanks.
Michael Chan (1):
bnxt_en: Improve stats context resource accounting with RDMA driver
loaded.[...]
Here is the summary with links:
- [net,1/2] bnxt_en: Improve stats context resource accounting with RDMA driver loaded.
https://git.kernel.org/netdev/net/c/869c4d5eb1e6 - [net,2/2] bnxt_en: Clear DEFRAG flag in firmware message when retry flashing. https://git.kernel.org/netdev/net/c/687487751814
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html