RE: [EXT] Re: [PATCH v2 net 2/2] net: stmmac: dwmac-imx: pause the TXC clock in fixed-link

From: Shenwei Wang
Date: Fri Jul 28 2023 - 13:01:54 EST




> -----Original Message-----
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: Friday, July 28, 2023 11:56 AM
> To: Shenwei Wang <shenwei.wang@xxxxxxx>
> Cc: Fabio Estevam <festevam@xxxxxxxxx>; Russell King
> <linux@xxxxxxxxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric
> Dumazet <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo
> Abeni <pabeni@xxxxxxxxxx>; Maxime Coquelin
> <mcoquelin.stm32@xxxxxxxxx>; Shawn Guo <shawnguo@xxxxxxxxxx>; Sascha
> Hauer <s.hauer@xxxxxxxxxxxxxx>; Neil Armstrong <neil.armstrong@xxxxxxxxxx>;
> Kevin Hilman <khilman@xxxxxxxxxxxx>; Vinod Koul <vkoul@xxxxxxxxxx>; Chen-
> Yu Tsai <wens@xxxxxxxx>; Jernej Skrabec <jernej.skrabec@xxxxxxxxx>; Samuel
> Holland <samuel@xxxxxxxxxxxx>; Giuseppe Cavallaro
> <peppe.cavallaro@xxxxxx>; Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx>;
> Jose Abreu <joabreu@xxxxxxxxxxxx>; Pengutronix Kernel Team
> <kernel@xxxxxxxxxxxxxx>; dl-linux-imx <linux-imx@xxxxxxx>; Jerome Brunet
> <jbrunet@xxxxxxxxxxxx>; Martin Blumenstingl
> <martin.blumenstingl@xxxxxxxxxxxxxx>; Bhupesh Sharma
> <bhupesh.sharma@xxxxxxxxxx>; Nobuhiro Iwamatsu
> <nobuhiro1.iwamatsu@xxxxxxxxxxxxx>; Simon Horman
> <simon.horman@xxxxxxxxxxxx>; Andrew Halaney <ahalaney@xxxxxxxxxx>;
> Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>; Wong Vee Khee
> <veekhee@xxxxxxxxx>; Revanth Kumar Uppala <ruppala@xxxxxxxxxx>; Jochen
> Henneberg <jh@xxxxxxxxxxxxxxxxxxxxxxxxxx>; netdev@xxxxxxxxxxxxxxx; linux-
> stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; linux-amlogic@xxxxxxxxxxxxxxxxxxx;
> imx@xxxxxxxxxxxxxxx; Frank Li <frank.li@xxxxxxx>
> Subject: Re: [EXT] Re: [PATCH v2 net 2/2] net: stmmac: dwmac-imx: pause the
> TXC clock in fixed-link
>
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
>
>
> > > Andrew Lunn gave the following feedback in v1:
> > >
> > > "The SJA1105 has the problem, so i would expect it to be involved in the
> solution.
> > > Otherwise, how is this going to work for other MAC drivers?
> > >
> > > Maybe you need to expose a common clock framework clock for the TXC
> > > clock line, which the SJA1105 can disable/enable? That then makes it
> > > clear what other MAC drivers need to do."
> >
> > I have been considering this plan for some time. The idea should be
> > implemented across all i.mx8/9 platforms. I am going to start to work
> > on it in the following month, and it will take some time to implement it.
>
> So you don't think anybody will use anything else for driving this switch? Vybrid?
>

Vybrid or i.MX6 don't have such kind of problem because they are not using dwmac.
Those are FEC MACs, and the MAC itself can provide delay to the switch.

Thanks,
Shenwei

> It does not really matter what you implement it for, so long is at is a clear
> example for others to follow who might be using the switch with other SoCs.
>
> Andrew