]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bnxt_en: Do not initialize PTP on older P3/P4 chips
authorMichael Chan <michael.chan@broadcom.com>
Mon, 17 Apr 2023 06:58:18 +0000 (23:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Apr 2023 12:29:57 +0000 (14:29 +0200)
commita1f76b8305235f7ec1f4484cd04d5144f4915d43
tree6012b36f3f938374ee70746dc054be093a94a9b4
parente93b900030a3598d92ab11401484cd1a32ba101d
bnxt_en: Do not initialize PTP on older P3/P4 chips

[ Upstream commit e8b51a1a15d5a3cce231e0669f6a161dc5bb9b75 ]

The driver does not support PTP on these older chips and it is assuming
that firmware on these older chips will not return the
PORT_MAC_PTP_QCFG_RESP_FLAGS_HWRM_ACCESS flag in __bnxt_hwrm_ptp_qcfg(),
causing the function to abort quietly.

But newer firmware now sets this flag and so __bnxt_hwrm_ptp_qcfg()
will proceed further.  Eventually it will fail in bnxt_ptp_init() ->
bnxt_map_ptp_regs() because there is no code to support the older chips.
The driver will then complain:

"PTP initialization failed.\n"

Fix it so that we abort quietly earlier without going through the
unnecessary steps and alarming the user with the warning log.

Fixes: ae5c42f0b92c ("bnxt_en: Get PTP hardware capability from firmware")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c