Re: [PATCH net v2] bnxt_en: Fix NULL pointer crash in bnxt_ptp_enable during error cleanup
From: Michael Chan
Date: Mon Jan 05 2026 - 12:45:49 EST
On Mon, Jan 5, 2026 at 7:51 AM Pavan Chebbi <pavan.chebbi@xxxxxxxxxxxx> wrote:
>
> On Mon, Jan 5, 2026 at 6:59 PM Russell King (Oracle)
> <linux@xxxxxxxxxxxxxxx> wrote:
> >
> > Second, __bnxt_hwrm_ptp_qcfg() calls bnxt_ptp_clear() if
> > bp->hwrm_spec_code < 0x10801 || !BNXT_CHIP_P5_PLUS(bp) is true or
> > hwrm_req_init() fails. Is it really possible that we have the PTP
> > clock registered when PTP isn't supported?
>
> Right, this check may not make much sense because we call
> __bnxt_hwrm_ptp_qcfg() only after we know PTP is supported.
> Michael may tell better but I think we could improve by removing that check.
>
Some older FW may advertise support for PTP using an older scheme that
the driver does not support. The FW running on an older class of
chips may also advertise support for PTP and it's also not supported
by the driver. In the former case, if FW is downgraded, the test may
become true.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature