diff mbox series

[net] bnxt_en: fix free-runnig PHC mode

Message ID 20230418202511.1544735-1-vadfed@meta.com (mailing list archive)
State Accepted
Commit 8c154d272c3e03b100baaf1df473f22a78fa403e
Delegated to: Netdev Maintainers
Headers show
Series [net] bnxt_en: fix free-runnig PHC mode | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 19 this patch: 19
netdev/cc_maintainers warning 4 maintainers not CCed: edumazet@google.com pabeni@redhat.com richardcochran@gmail.com davem@davemloft.net
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 19 this patch: 19
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Vadim Fedorenko April 18, 2023, 8:25 p.m. UTC
The patch in fixes changed the way real-time mode is chosen for PHC on
the NIC. Apparently there is one more use case of the check outside of
ptp part of the driver which was not converted to the new macro and is
making a lot of noise in free-running mode.

Fixes: 131db4991622 ("bnxt_en: reset PHC frequency in free-running mode")
Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Chan April 18, 2023, 9:47 p.m. UTC | #1
On Tue, Apr 18, 2023 at 1:25 PM Vadim Fedorenko <vadfed@meta.com> wrote:
>
> The patch in fixes changed the way real-time mode is chosen for PHC on
> the NIC. Apparently there is one more use case of the check outside of
> ptp part of the driver which was not converted to the new macro and is
> making a lot of noise in free-running mode.
>
> Fixes: 131db4991622 ("bnxt_en: reset PHC frequency in free-running mode")
> Signed-off-by: Vadim Fedorenko <vadfed@meta.com>

Looks good to me.  Please wait for Pavan to review it also.  Thanks.

Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Pavan Chebbi April 19, 2023, 2:10 a.m. UTC | #2
On Wed, Apr 19, 2023 at 3:17 AM Michael Chan <michael.chan@broadcom.com> wrote:
>
> On Tue, Apr 18, 2023 at 1:25 PM Vadim Fedorenko <vadfed@meta.com> wrote:
> >
> > The patch in fixes changed the way real-time mode is chosen for PHC on
> > the NIC. Apparently there is one more use case of the check outside of
> > ptp part of the driver which was not converted to the new macro and is
> > making a lot of noise in free-running mode.
> >
> > Fixes: 131db4991622 ("bnxt_en: reset PHC frequency in free-running mode")
> > Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
>
> Looks good to me.  Please wait for Pavan to review it also.  Thanks.
>
> Reviewed-by: Michael Chan <michael.chan@broadcom.com>

Looks good to me as well. Thanks.
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
patchwork-bot+netdevbpf@kernel.org April 20, 2023, 12:50 a.m. UTC | #3
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 18 Apr 2023 13:25:11 -0700 you wrote:
> The patch in fixes changed the way real-time mode is chosen for PHC on
> the NIC. Apparently there is one more use case of the check outside of
> ptp part of the driver which was not converted to the new macro and is
> making a lot of noise in free-running mode.
> 
> Fixes: 131db4991622 ("bnxt_en: reset PHC frequency in free-running mode")
> Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
> 
> [...]

Here is the summary with links:
  - [net] bnxt_en: fix free-runnig PHC mode
    https://git.kernel.org/netdev/net/c/8c154d272c3e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index ef97a4190b39..651b79ce5d80 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -2388,7 +2388,7 @@  static int bnxt_async_event_process(struct bnxt *bp,
 	case ASYNC_EVENT_CMPL_EVENT_ID_PHC_UPDATE: {
 		switch (BNXT_EVENT_PHC_EVENT_TYPE(data1)) {
 		case ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_RTC_UPDATE:
-			if (bp->fw_cap & BNXT_FW_CAP_PTP_RTC) {
+			if (BNXT_PTP_USE_RTC(bp)) {
 				struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
 				u64 ns;