bnxt_en: Bug fixes
Michael Chan
maintainercover bnxt_en: Bug fixes
The first 2 patches fix 2 potential issues in the aux bus initialization and error recovery paths. The 3rd patch fixes a potential PTP TX timestamp issue during error recovery.
Pavan Chebbi (1):
bnxt_en: Reset PTP tx_avail after possible firmware reset
Vikas Gupta (2):
bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init()
bnxt_en: Fix error recovery for RoCE ulp client
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 1/3 bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init()
From: Vikas Gupta <[email protected]>
If ulp = kzalloc() fails, the allocated edev will leak because it is not properly assigned and the cleanup path will not be able to free it. Fix it by assigning it properly immediately after allocation.
--- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +2 -1
@@ -392,12 +392,13 @@ void bnxt_rdma_aux_device_init(struct bnxt *bp)if (!edev) goto aux_dev_uninit; + aux_priv->edev = edev; + ulp =kzalloc (sizeof (*ulp),GFP_KERNEL );if (!ulp) goto aux_dev_uninit; edev->ulp_tbl = ulp; - aux_priv->edev = edev; bp->edev = edev;bnxt_set_edev_info (edev, bp);
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 2/3 bnxt_en: Fix error recovery for RoCE ulp client
In reply to Michael ChanFrom: Vikas Gupta <[email protected]>
Since runtime MSIXs vector allocation/free has been removed, the L2 driver needs to repopulate the MSIX entries for the ulp client as the irq table may change during the recovery process.
--- drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c +3 -0
@@ -210,6 +210,9 @@ void bnxt_ulp_start(struct bnxt *bp, int err)if (err)return ; +if (edev->ulp_tbl->msix_requested) +bnxt_fill_msix_vecs (bp, edev->msix_entries); +if (aux_priv) {struct auxiliary_device *adev;
Signature · 1 line
2.30.1
Michael Chan
maintainerPATCH 3/3 bnxt_en: Reset PTP tx_avail after possible firmware reset
In reply to Michael ChanFrom: Pavan Chebbi <[email protected]>
It is possible that during error recovery and firmware reset, there is a pending TX PTP packet waiting for the timestamp. We need to reset this condition so that after recovery, the tx_avail count for PTP is reset back to the initial value. Otherwise, we may not accept any PTP TX timestamps after recovery.
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -0
@@ -11758,6 +11758,8 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)/* VF-reps may need to be re-opened after the PF is re-opened */ if (BNXT_PF (bp))bnxt_vf_reps_open (bp); +if (bp->ptp_cfg) +atomic_set (&bp->ptp_cfg->tx_avail,BNXT_MAX_TX_TS );bnxt_ptp_init_rtc (bp, true);bnxt_ptp_cfg_tstamp_filters (bp);bnxt_cfg_usr_fltrs (bp);
Signature · 1 line
2.30.1
This series was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 8 lines · On Fri, 5 Apr 2024 16:55:10 -0700 you wrote:
The first 2 patches fix 2 potential issues in the aux bus initialization and error recovery paths. The 3rd patch fixes a potential PTP TX timestamp issue during error recovery.
Pavan Chebbi (1):
bnxt_en: Reset PTPtx_availafter possible firmware reset[...]
Here is the summary with links:
- [net,1/3] bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init()
https://git.kernel.org/netdev/net/c/7ac10c7d728d - [net,2/3] bnxt_en: Fix error recovery for RoCE ulp client https://git.kernel.org/netdev/net/c/b5ea7d33ba2a - [net,3/3] bnxt_en: Reset PTP tx_avail after possible firmware reset https://git.kernel.org/netdev/net/c/faa12ca24558
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html