* [PATCH net] net: atlantic: fix PTP on AQC10X
@ 2020-07-22 19:09 Mark Starovoytov
2020-07-23 1:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Mark Starovoytov @ 2020-07-22 19:09 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski
Cc: Igor Russkikh, netdev, Egor Pomozov, Mark Starovoytov
From: Egor Pomozov <epomozov@marvell.com>
This patch fixes PTP on AQC10X.
PTP support on AQC10X requires FW involvement and FW configures the
TPS data arb mode itself.
So we must make sure driver doesn't touch TPS data arb mode on AQC10x
if PTP is enabled. Otherwise, there are no timestamps even though
packets are flowing.
Fixes: 2deac71ac492a ("net: atlantic: QoS implementation: min_rate")
Signed-off-by: Egor Pomozov <epomozov@marvell.com>
Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
---
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
index 14d79f70cad7..135c27ec7c6a 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
@@ -354,8 +354,13 @@ static int hw_atl_b0_hw_init_tx_tc_rate_limit(struct aq_hw_s *self)
/* WSP, if min_rate is set for at least one TC.
* RR otherwise.
+ *
+ * NB! MAC FW sets arb mode itself if PTP is enabled. We shouldn't
+ * overwrite it here in that case.
*/
- hw_atl_tps_tx_pkt_shed_data_arb_mode_set(self, min_rate_msk ? 1U : 0U);
+ if (!nic_cfg->is_ptp)
+ hw_atl_tps_tx_pkt_shed_data_arb_mode_set(self, min_rate_msk ? 1U : 0U);
+
/* Data TC Arbiter takes precedence over Descriptor TC Arbiter,
* leave Descriptor TC Arbiter as RR.
*/
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] net: atlantic: fix PTP on AQC10X
2020-07-22 19:09 [PATCH net] net: atlantic: fix PTP on AQC10X Mark Starovoytov
@ 2020-07-23 1:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-23 1:15 UTC (permalink / raw)
To: mstarovoitov; +Cc: kuba, irusskikh, netdev, epomozov
From: Mark Starovoytov <mstarovoitov@marvell.com>
Date: Wed, 22 Jul 2020 22:09:58 +0300
> From: Egor Pomozov <epomozov@marvell.com>
>
> This patch fixes PTP on AQC10X.
> PTP support on AQC10X requires FW involvement and FW configures the
> TPS data arb mode itself.
> So we must make sure driver doesn't touch TPS data arb mode on AQC10x
> if PTP is enabled. Otherwise, there are no timestamps even though
> packets are flowing.
>
> Fixes: 2deac71ac492a ("net: atlantic: QoS implementation: min_rate")
> Signed-off-by: Egor Pomozov <epomozov@marvell.com>
> Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com>
> Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-23 1:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-22 19:09 [PATCH net] net: atlantic: fix PTP on AQC10X Mark Starovoytov
2020-07-23 1:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).