* [PATCH net] net: phy: mscc: fix packet loss due to RGMII delays
@ 2023-06-27 9:11 Vladimir Oltean
2023-06-27 9:19 ` Katakam, Harini
2023-06-27 12:13 ` Vladimir Oltean
0 siblings, 2 replies; 4+ messages in thread
From: Vladimir Oltean @ 2023-06-27 9:11 UTC (permalink / raw)
To: netdev
Cc: Jose Abreu, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel, Harini Katakam
Two deadly typos break RX and TX traffic on the VSC8502 PHY using RGMII
if phy-mode = "rgmii-id" or "rgmii-txid", and no "tx-internal-delay-ps"
override exists. The negative error code from phy_get_internal_delay()
does not get overridden with the delay deduced from the phy-mode, and
later gets committed to hardware. Also, the rx_delay gets overridden by
what should have been the tx_delay.
Fixes: dbb050d2bfc8 ("phy: mscc: Add support for RGMII delay configuration")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/net/phy/mscc/mscc_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/mscc/mscc_main.c b/drivers/net/phy/mscc/mscc_main.c
index 669a4a7a28ce..4171f01d34e5 100644
--- a/drivers/net/phy/mscc/mscc_main.c
+++ b/drivers/net/phy/mscc/mscc_main.c
@@ -563,9 +563,9 @@ static int vsc85xx_update_rgmii_cntl(struct phy_device *phydev, u32 rgmii_cntl,
if (tx_delay < 0) {
if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
- rx_delay = RGMII_CLK_DELAY_2_0_NS;
+ tx_delay = RGMII_CLK_DELAY_2_0_NS;
else
- rx_delay = RGMII_CLK_DELAY_0_2_NS;
+ tx_delay = RGMII_CLK_DELAY_0_2_NS;
}
reg_val |= rx_delay << rgmii_rx_delay_pos;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* RE: [PATCH net] net: phy: mscc: fix packet loss due to RGMII delays
2023-06-27 9:11 [PATCH net] net: phy: mscc: fix packet loss due to RGMII delays Vladimir Oltean
@ 2023-06-27 9:19 ` Katakam, Harini
2023-06-27 12:13 ` Vladimir Oltean
1 sibling, 0 replies; 4+ messages in thread
From: Katakam, Harini @ 2023-06-27 9:19 UTC (permalink / raw)
To: Vladimir Oltean, netdev@vger.kernel.org
Cc: Jose Abreu, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel@vger.kernel.org
> -----Original Message-----
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> Sent: Tuesday, June 27, 2023 2:41 PM
> To: netdev@vger.kernel.org
> Cc: Jose Abreu <Jose.Abreu@synopsys.com>; Andrew Lunn
> <andrew@lunn.ch>; Heiner Kallweit <hkallweit1@gmail.com>; Russell King
> <linux@armlinux.org.uk>; David S. Miller <davem@davemloft.net>; Eric
> Dumazet <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo
> Abeni <pabeni@redhat.com>; linux-kernel@vger.kernel.org; Katakam, Harini
> <harini.katakam@amd.com>
> Subject: [PATCH net] net: phy: mscc: fix packet loss due to RGMII delays
>
> Two deadly typos break RX and TX traffic on the VSC8502 PHY using RGMII
> if phy-mode = "rgmii-id" or "rgmii-txid", and no "tx-internal-delay-ps"
> override exists. The negative error code from phy_get_internal_delay()
> does not get overridden with the delay deduced from the phy-mode, and
> later gets committed to hardware. Also, the rx_delay gets overridden by
> what should have been the tx_delay.
>
> Fixes: dbb050d2bfc8 ("phy: mscc: Add support for RGMII delay
> configuration")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Thanks
Reviewed-by: Harini Katakam <harini.katakam@amd.com>
Regards,
Harini
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: phy: mscc: fix packet loss due to RGMII delays
2023-06-27 9:11 [PATCH net] net: phy: mscc: fix packet loss due to RGMII delays Vladimir Oltean
2023-06-27 9:19 ` Katakam, Harini
@ 2023-06-27 12:13 ` Vladimir Oltean
2023-06-27 12:47 ` Paolo Abeni
1 sibling, 1 reply; 4+ messages in thread
From: Vladimir Oltean @ 2023-06-27 12:13 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, Jose Abreu, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel, Harini Katakam
On Tue, Jun 27, 2023 at 12:11:09PM +0300, Vladimir Oltean wrote:
> Two deadly typos break RX and TX traffic on the VSC8502 PHY using RGMII
> if phy-mode = "rgmii-id" or "rgmii-txid", and no "tx-internal-delay-ps"
> override exists. The negative error code from phy_get_internal_delay()
> does not get overridden with the delay deduced from the phy-mode, and
> later gets committed to hardware. Also, the rx_delay gets overridden by
> what should have been the tx_delay.
>
> Fixes: dbb050d2bfc8 ("phy: mscc: Add support for RGMII delay configuration")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
I may have mis-targeted this patch towards "net" while the "net-next"
pull request has not been yet sent out. Can patchwork be instructed to
re-run the tests on net-next?
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: phy: mscc: fix packet loss due to RGMII delays
2023-06-27 12:13 ` Vladimir Oltean
@ 2023-06-27 12:47 ` Paolo Abeni
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2023-06-27 12:47 UTC (permalink / raw)
To: Vladimir Oltean, Vladimir Oltean
Cc: netdev, Jose Abreu, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, linux-kernel,
Harini Katakam
On Tue, 2023-06-27 at 15:13 +0300, Vladimir Oltean wrote:
> On Tue, Jun 27, 2023 at 12:11:09PM +0300, Vladimir Oltean wrote:
> > Two deadly typos break RX and TX traffic on the VSC8502 PHY using RGMII
> > if phy-mode = "rgmii-id" or "rgmii-txid", and no "tx-internal-delay-ps"
> > override exists. The negative error code from phy_get_internal_delay()
> > does not get overridden with the delay deduced from the phy-mode, and
> > later gets committed to hardware. Also, the rx_delay gets overridden by
> > what should have been the tx_delay.
> >
> > Fixes: dbb050d2bfc8 ("phy: mscc: Add support for RGMII delay configuration")
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> > ---
>
> I may have mis-targeted this patch towards "net" while the "net-next"
> pull request has not been yet sent out. Can patchwork be instructed to
> re-run the tests on net-next?
I'm not 110% sure, but I think you have to re-send the patch with a
different prefix to achieve the above.
Cheers,
Paolo
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-27 12:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 9:11 [PATCH net] net: phy: mscc: fix packet loss due to RGMII delays Vladimir Oltean
2023-06-27 9:19 ` Katakam, Harini
2023-06-27 12:13 ` Vladimir Oltean
2023-06-27 12:47 ` Paolo Abeni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox