mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 13:43:55 +08:00
bnxt_en: Fix PTP capability discovery
The current PTP initialization logic does not account for firmware
reset that may cause PTP capability to change. The valid pointer
bp->ptp_cfg is used to indicate that the device is capable of PTP
and that it has been initialized. So we must clean up bp->ptp_cfg
and free it if the firmware after reset does not support PTP.
Fixes: 93cb62d98e
("bnxt_en: Enable hardware PTP support")
Cc: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d7859afb68
commit
de5bf19414
@ -7574,8 +7574,12 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
|
||||
bp->flags &= ~BNXT_FLAG_WOL_CAP;
|
||||
if (flags & FUNC_QCAPS_RESP_FLAGS_WOL_MAGICPKT_SUPPORTED)
|
||||
bp->flags |= BNXT_FLAG_WOL_CAP;
|
||||
if (flags & FUNC_QCAPS_RESP_FLAGS_PTP_SUPPORTED)
|
||||
if (flags & FUNC_QCAPS_RESP_FLAGS_PTP_SUPPORTED) {
|
||||
__bnxt_hwrm_ptp_qcfg(bp);
|
||||
} else {
|
||||
kfree(bp->ptp_cfg);
|
||||
bp->ptp_cfg = NULL;
|
||||
}
|
||||
} else {
|
||||
#ifdef CONFIG_BNXT_SRIOV
|
||||
struct bnxt_vf_info *vf = &bp->vf;
|
||||
|
Loading…
Reference in New Issue
Block a user