[PATCH net-next 0/6] net: ethernet: fs_enet: Cleanup and phylink conversion

2024-08-28 Thread Maxime Chevallier
that become irrelevant when using phylink. Testing was done on an MPC866 and MPC885, any test on other platforms that use fs_enet are more than welcome. Thanks, Maxime Maxime Chevallier (6): net: ethernet: fs_enet: convert to SPDX net: ethernet: fs_enet: cosmetic cleanups net: et

[PATCH net-next 3/6] net: ethernet: fs_enet: drop the .adjust_link custom fs_ops

2024-08-28 Thread Maxime Chevallier
There's no in-tree user for the fs_ops .adjust_link() function, so we can always use the generic one in fe_enet-main. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 7 +-- drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 1 - 2

[PATCH net-next 4/6] net: ethernet: fs_enet: drop unused phy_info and mii_if_info

2024-08-28 Thread Maxime Chevallier
There's no user of the struct phy_info, the 'phy' field and the mii_if_info in the fs_enet driver, probably dating back when phylib wasn't as widely used. Drop these from the driver code. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/fs_enet/fs_enet.h

[PATCH net-next 2/6] net: ethernet: fs_enet: cosmetic cleanups

2024-08-28 Thread Maxime Chevallier
- Fixing some typos - Fixing whitespace issues This is a cosmetic change and doesn't introduce any change in behaviour. Signed-off-by: Maxime Chevallier --- .../ethernet/freescale/fs_enet/fs_enet-main.c | 220 +++--- 1 file changed, 89 insertions(+), 131 deletions(-) diff --gi

[PATCH net-next 6/6] net: ethernet: fs_enet: phylink conversion

2024-08-28 Thread Maxime Chevallier
allows removing some internal flags such as the use_rmii flag. Signed-off-by: Maxime Chevallier --- .../net/ethernet/freescale/fs_enet/Kconfig| 2 +- .../ethernet/freescale/fs_enet/fs_enet-main.c | 203 +- .../net/ethernet/freescale/fs_enet/fs_enet.h | 12 +- .../net

[PATCH net-next 5/6] net: ethernet: fs_enet: fcc: use macros for speed and duplex values

2024-08-28 Thread Maxime Chevallier
The PHY speed and duplex should be manipulated using the SPEED_XXX and DUPLEX_XXX macros available. Use it in the fcc, fec and scc MAC for fs_enet. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 4 ++-- drivers/net/ethernet/freescale/fs_enet/mac-fec.c

[PATCH net-next 1/6] net: ethernet: fs_enet: convert to SPDX

2024-08-28 Thread Maxime Chevallier
The ENET driver has SPDX tags in the header files, but they were missing in the C files. Change the licence information to SPDX format. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 5 + drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 5

Re: [PATCH net-next 6/6] net: ethernet: fs_enet: phylink conversion

2024-08-28 Thread Maxime Chevallier
Hi Russell, On Wed, 28 Aug 2024 11:38:31 +0100 "Russell King (Oracle)" wrote: > On Wed, Aug 28, 2024 at 11:51:02AM +0200, Maxime Chevallier wrote: > > +static int fs_eth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) > > +{ > > + struct fs_enet

Re: [PATCH net-next 6/6] net: ethernet: fs_enet: phylink conversion

2024-08-28 Thread Maxime Chevallier
Hello Russell, On Wed, 28 Aug 2024 14:54:57 +0100 "Russell King (Oracle)" wrote: > On Wed, Aug 28, 2024 at 01:44:13PM +0200, Maxime Chevallier wrote: > > Hi Russell, > > > > On Wed, 28 Aug 2024 11:38:31 +0100 > > "Russell King (Oracle)" wrote:

Re: [PATCH net-next 6/6] net: ethernet: fs_enet: phylink conversion

2024-08-29 Thread Maxime Chevallier
Hello Simon, On Wed, 28 Aug 2024 17:32:24 +0100 Simon Horman wrote: > On Wed, Aug 28, 2024 at 11:51:02AM +0200, Maxime Chevallier wrote: > > fs_enet is a quite old but still used Ethernet driver found on some NXP > > devices. It has support for 10/100 Mbps ethernet, wit

[PATCH net-next v2 3/7] net: ethernet: fs_enet: drop the .adjust_link custom fs_ops

2024-08-29 Thread Maxime Chevallier
There's no in-tree user for the fs_ops .adjust_link() function, so we can always use the generic one in fe_enet-main. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 7 +-- driver

[PATCH net-next v2 0/7] net: ethernet: fs_enet: Cleanup and phylink conversion

2024-08-29 Thread Maxime Chevallier
n.com/ Thanks, Maxime Maxime Chevallier (7): net: ethernet: fs_enet: convert to SPDX net: ethernet: fs_enet: cosmetic cleanups net: ethernet: fs_enet: drop the .adjust_link custom fs_ops net: ethernet: fs_enet: drop unused phy_info and mii_if_info net: ethernet: fs_enet: fcc: use macros for

[PATCH net-next v2 1/7] net: ethernet: fs_enet: convert to SPDX

2024-08-29 Thread Maxime Chevallier
The ENET driver has SPDX tags in the header files, but they were missing in the C files. Change the licence information to SPDX format. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 5

[PATCH net-next v2 5/7] net: ethernet: fs_enet: fcc: use macros for speed and duplex values

2024-08-29 Thread Maxime Chevallier
The PHY speed and duplex should be manipulated using the SPEED_XXX and DUPLEX_XXX macros available. Use it in the fcc, fec and scc MAC for fs_enet. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/fs_enet/mac-fcc.c

[PATCH net-next v2 6/7] net: ethernet: fs_enet: simplify clock handling with devm accessors

2024-08-29 Thread Maxime Chevallier
devm_clock_get_enabled() can be used to simplify clock handling for the PER register clock. Signed-off-by: Maxime Chevallier --- - v2: new patch .../ethernet/freescale/fs_enet/fs_enet-main.c| 16 drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 2 -- 2 files changed, 4

[PATCH net-next v2 7/7] net: ethernet: fs_enet: phylink conversion

2024-08-29 Thread Maxime Chevallier
allows removing some internal flags such as the use_rmii flag. Acked-by: Christophe Leroy Signed-off-by: Maxime Chevallier --- V2: - Drop the netif_running check in the ioctl() handler, following Russell's review - Fix the probe cleanup sequence, thanks to Simon's review .../ne

[PATCH net-next v2 4/7] net: ethernet: fs_enet: drop unused phy_info and mii_if_info

2024-08-29 Thread Maxime Chevallier
There's no user of the struct phy_info, the 'phy' field and the mii_if_info in the fs_enet driver, probably dating back when phylib wasn't as widely used. Drop these from the driver code. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Maxime Chev

[PATCH net-next v2 2/7] net: ethernet: fs_enet: cosmetic cleanups

2024-08-29 Thread Maxime Chevallier
- Fixing some typos - Fixing whitespace issues This is a cosmetic change and doesn't introduce any change in behaviour. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Maxime Chevallier --- .../ethernet/freescale/fs_enet/fs_enet-main.c | 220 +++--- 1 f

Re: [PATCH net-next v2 3/7] net: ethernet: fs_enet: drop the .adjust_link custom fs_ops

2024-09-04 Thread Maxime Chevallier
Hi Andrew, On Fri, 30 Aug 2024 23:06:08 +0200 Andrew Lunn wrote: > > --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c > > +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c > > @@ -649,12 +649,7 @@ static void fs_adjust_link(struct net_device *dev) > > unsigned long flags

Re: [PATCH net-next v2 4/7] net: ethernet: fs_enet: drop unused phy_info and mii_if_info

2024-09-04 Thread Maxime Chevallier
Hi Andrew, On Fri, 30 Aug 2024 23:07:56 +0200 Andrew Lunn wrote: > On Thu, Aug 29, 2024 at 06:15:27PM +0200, Maxime Chevallier wrote: > > There's no user of the struct phy_info, the 'phy' field and the > > mii_if_info in the fs_enet driver, probably dating back wh

Re: [PATCH net-next v2 7/7] net: ethernet: fs_enet: phylink conversion

2024-09-04 Thread Maxime Chevallier
Hi Jakub, On Mon, 2 Sep 2024 18:55:43 -0700 Jakub Kicinski wrote: > On Thu, 29 Aug 2024 18:15:30 +0200 Maxime Chevallier wrote: > > @@ -582,15 +591,12 @@ static void fs_timeout_work(struct work_struct *work) > > > > dev->stats.tx_errors++; > > > > -

Re: [PATCH net-next v2 3/7] net: ethernet: fs_enet: drop the .adjust_link custom fs_ops

2024-09-04 Thread Maxime Chevallier
On Wed, 4 Sep 2024 14:36:58 +0200 Andrew Lunn wrote: > On Wed, Sep 04, 2024 at 10:27:11AM +0200, Maxime Chevallier wrote: > > Hi Andrew, > > > > On Fri, 30 Aug 2024 23:06:08 +0200 > > Andrew Lunn wrote: > > > > > > --- a/drivers/net/ethernet/f

[PATCH net-next v3 0/8] net: ethernet: fs_enet: Cleanup and phylink conversion

2024-09-04 Thread Maxime Chevallier
taking rtnl twice when canceling a pending tx_timeout. Thanks Jakub for spotting this. Link to V2: https://lore.kernel.org/netdev/20240829161531.610874-1-maxime.chevall...@bootlin.com/ Link to V1: https://lore.kernel.org/netdev/20240828095103.132625-1-maxime.chevall...@bootlin.com/ Maxime

[PATCH net-next v3 3/8] net: ethernet: fs_enet: drop the .adjust_link custom fs_ops

2024-09-04 Thread Maxime Chevallier
There's no in-tree user for the fs_ops .adjust_link() function, so we can always use the generic one in fe_enet-main. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/fs_enet/fs_enet-m

[PATCH net-next v3 2/8] net: ethernet: fs_enet: cosmetic cleanups

2024-09-04 Thread Maxime Chevallier
- Fixing some typos - Fixing whitespace issues This is a cosmetic change and doesn't introduce any change in behaviour. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- .../ethernet/freescale/fs_enet/fs_en

[PATCH net-next v3 5/8] net: ethernet: fs_enet: drop unused phy_info and mii_if_info

2024-09-04 Thread Maxime Chevallier
nux/mii.h altogether in the driver. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- .../net/ethernet/freescale/fs_enet/fs_enet-main.c| 1 - drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 12

[PATCH net-next v3 8/8] net: ethernet: fs_enet: phylink conversion

2024-09-04 Thread Maxime Chevallier
allows removing some internal flags such as the use_rmii flag. Acked-by: Christophe Leroy Signed-off-by: Maxime Chevallier --- .../net/ethernet/freescale/fs_enet/Kconfig| 2 +- .../ethernet/freescale/fs_enet/fs_enet-main.c | 215 +- .../net/ethernet/freescale/fs_enet

[PATCH net-next v3 7/8] net: ethernet: fs_enet: simplify clock handling with devm accessors

2024-09-04 Thread Maxime Chevallier
devm_clock_get_enabled() can be used to simplify clock handling for the PER register clock. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- .../ethernet/freescale/fs_enet/fs_enet-main.c| 16 drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 2 -- 2 files

[PATCH net-next v3 1/8] net: ethernet: fs_enet: convert to SPDX

2024-09-04 Thread Maxime Chevallier
The ENET driver has SPDX tags in the header files, but they were missing in the C files. Change the licence information to SPDX format. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale

[PATCH net-next v3 6/8] net: ethernet: fs_enet: use macros for speed and duplex values

2024-09-04 Thread Maxime Chevallier
The PHY speed and duplex should be manipulated using the SPEED_XXX and DUPLEX_XXX macros available. Use it in the fcc, fec and scc MAC for fs_enet. Acked-by: Christophe Leroy Reviewed-by: Christophe Leroy Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- drivers/net/ethernet

[PATCH net-next v3 4/8] net: ethernet: fs_enet: only protect the .restart() call in .adjust_link

2024-09-04 Thread Maxime Chevallier
->lock spinlock, so we can move the spinlock protection around the .restart() call instead of the entire adjust_link() call. By doing so, we can simplify further the .adjust_link() callback and avoid the intermediate helper. Suggested-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- ...

Re: [PATCH net-next v3 7/8] net: ethernet: fs_enet: simplify clock handling with devm accessors

2024-09-14 Thread Maxime Chevallier
Hello Christophe, On Fri, 13 Sep 2024 22:24:28 +0200 Christophe JAILLET wrote: > Le 04/09/2024 à 19:18, Maxime Chevallier a écrit : > > devm_clock_get_enabled() can be used to simplify clock handling for the > > PER register clock. > > > > Reviewed-by: Andrew Lunn

[PATCH net-next] net: ethernet: fs_enet: Make the per clock optional

2024-09-14 Thread Maxime Chevallier
oo.fr/ Fixes: c614acf6e8e1 ("net: ethernet: fs_enet: simplify clock handling with devm accessors") Signed-off-by: Maxime Chevallier --- This patch fixes a commit in net-next. drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH net-next 7/7] net: freescale: ucc_geth: phylink conversion

2024-11-07 Thread Maxime Chevallier
ucc_geth is quite capable in terms of supported interfaces, and even includes an externally controlled PCS (well, TBI). Port that driver to phylink. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/Kconfig| 3 +- drivers/net/ethernet/freescale/ucc_geth.c | 516

[PATCH net-next 1/7] net: freescale: ucc_geth: Drop support for the "interface" DT property

2024-11-07 Thread Maxime Chevallier
th that property gone, we can greatly simplify the parsing of the phy-interface-mode from the devicetree by using of_get_phy_mode(), allowing the removal of the open-coded parsing in the driver. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/ucc_geth.c | 63 +

[PATCH net-next 4/7] net: freescale: ucc_geth: Fix WOL configuration

2024-11-07 Thread Maxime Chevallier
The get/set_wol ethtool ops rely on querying the PHY for its WoL capabilities, checking for the presence of a PHY and a PHY interrupts isn't enough. Address that by cleaning up the WoL configuration sequence. Signed-off-by: Maxime Chevallier --- .../net/ethernet/freescale/ucc_geth_etht

[PATCH net-next 3/7] net: freescale: ucc_geth: Use netdev->phydev to access the PHY

2024-11-07 Thread Maxime Chevallier
As this driver pre-dates phylib, it uses a private pointer to get a reference to the attached phy_device. Drop that pointer and use the netdev's pointer instead. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/ucc_geth.c | 27 --- drivers/net/eth

[PATCH net-next 2/7] net: freescale: ucc_geth: split adjust_link for phylink conversion

2024-11-07 Thread Maxime Chevallier
Preparing the phylink conversion, split the adjust_link callbaclk, by clearly separating the mac configuration, link_up and link_down phases. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/ucc_geth.c | 180 +++--- 1 file changed, 93 insertions(+), 87

[PATCH net-next 0/7] net: freescale: ucc_geth: Phylink conversion

2024-11-07 Thread Maxime Chevallier
wasn't able to test, namely the TBI/RTBI handling. I did my best to replicate the existing logic, but I don't have the hardware to test it. Thanks, Maxime Maxime Chevallier (7): net: freescale: ucc_geth: Drop support for the "interface" DT property net: freescale: ucc_

[PATCH net-next 5/7] net: freescale: ucc_geth: Simplify frame length check

2024-11-07 Thread Maxime Chevallier
ff-by: Maxime Chevallier --- drivers/net/ethernet/freescale/ucc_geth.c | 21 +++-- drivers/net/ethernet/freescale/ucc_geth.h | 1 - 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c

[PATCH net-next 6/7] net: freescale: ucc_geth: Hardcode the preamble length to 7 bytes

2024-11-07 Thread Maxime Chevallier
. Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/ucc_geth.c | 21 - drivers/net/ethernet/freescale/ucc_geth.h | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale

Re: [PATCH net-next 2/7] net: freescale: ucc_geth: split adjust_link for phylink conversion

2024-11-07 Thread Maxime Chevallier
Hello Russell, On Thu, 7 Nov 2024 17:51:05 + "Russell King (Oracle)" wrote: > On Thu, Nov 07, 2024 at 06:02:49PM +0100, Maxime Chevallier wrote: > > Preparing the phylink conversion, split the adjust_link callbaclk, by > > clearly separating the mac configurati

Re: [PATCH net-next 4/7] net: freescale: ucc_geth: Fix WOL configuration

2024-11-07 Thread Maxime Chevallier
Hello Andrew, On Thu, 7 Nov 2024 18:49:00 +0100 Andrew Lunn wrote: > > + if (phydev) > > + phy_ethtool_get_wol(phydev, wol); > > + > > if (qe_alive_during_sleep()) > > wol->supported |= WAKE_MAGIC; > > So get WoL will return whatever methods the PHY supports, plus

Re: [PATCH net-next v2 01/10] net: freescale: ucc_geth: Drop support for the "interface" DT property

2024-11-20 Thread Maxime Chevallier
Hello Simon, On Fri, 15 Nov 2024 12:19:14 + Simon Horman wrote: [...] > > @@ -3627,18 +3588,17 @@ static int ucc_geth_probe(struct platform_device* > > ofdev) > > /* Find the TBI PHY node. If it's not there, we don't support SGMII */ > > ug_info->tbi_node = of_parse_phandle(np, "tb

[PATCH net-next v2 07/10] net: freescale: ucc_geth: Hardcode the preamble length to 7 bytes

2024-11-14 Thread Maxime Chevallier
. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V2: No changes drivers/net/ethernet/freescale/ucc_geth.c | 21 - drivers/net/ethernet/freescale/ucc_geth.h | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/drivers/net/ethernet/freescale

[PATCH net-next v2 00/10] net: freescale: ucc_geth: Phylink conversion

2024-11-14 Thread Maxime Chevallier
Link to V1: https://lore.kernel.org/netdev/20241107170255.1058124-1-maxime.chevall...@bootlin.com/ Maxime Chevallier (10): net: freescale: ucc_geth: Drop support for the "interface" DT property net: freescale: ucc_geth: split adjust_link for phylink conversion net: freescale: ucc_geth

[PATCH net-next v2 09/10] net: freescale: ucc_geth: Introduce a helper to check Reduced modes

2024-11-14 Thread Maxime Chevallier
that needs to be set when the MII mode is one of the supported reduced modes. Add a local helper for that. Signed-off-by: Maxime Chevallier --- V2: New patch drivers/net/ethernet/freescale/ucc_geth.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/ne

[PATCH net-next v2 04/10] net: freescale: ucc_geth: Fix WOL configuration

2024-11-14 Thread Maxime Chevallier
The get/set_wol ethtool ops rely on querying the PHY for its WoL capabilities, checking for the presence of a PHY and a PHY interrupts isn't enough. Address that by cleaning up the WoL configuration sequence. Signed-off-by: Maxime Chevallier --- V2: Reworked the whole configuration sequence

[PATCH net-next v2 01/10] net: freescale: ucc_geth: Drop support for the "interface" DT property

2024-11-14 Thread Maxime Chevallier
th that property gone, we can greatly simplify the parsing of the phy-interface-mode from the devicetree by using of_get_phy_mode(), allowing the removal of the open-coded parsing in the driver. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V2: No changes drivers/net/ethernet/freesca

[PATCH net-next v2 03/10] net: freescale: ucc_geth: Use netdev->phydev to access the PHY

2024-11-14 Thread Maxime Chevallier
As this driver pre-dates phylib, it uses a private pointer to get a reference to the attached phy_device. Drop that pointer and use the netdev's pointer instead. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V2: No changes drivers/net/ethernet/freescale/ucc_geth.c

[PATCH net-next v2 06/10] net: freescale: ucc_geth: Simplify frame length check

2024-11-14 Thread Maxime Chevallier
ed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V2: No changes drivers/net/ethernet/freescale/ucc_geth.c | 21 +++-- drivers/net/ethernet/freescale/ucc_geth.h | 1 - 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/dr

[PATCH net-next v2 08/10] net: freescale: ucc_geth: Move the serdes configuration around

2024-11-14 Thread Maxime Chevallier
ommit moves the function without any feature change. Signed-off-by: Maxime Chevallier --- V2: New patch drivers/net/ethernet/freescale/ucc_geth.c | 93 +++ 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/eth

[PATCH net-next v2 10/10] net: freescale: ucc_geth: phylink conversion

2024-11-14 Thread Maxime Chevallier
ucc_geth is quite capable in terms of supported interfaces, and even includes an externally controlled PCS (well, TBI). Port that driver to phylink. Signed-off-by: Maxime Chevallier --- V2: Adjust the WoL sequence, split-out a few things from patches 8/9 drivers/net/ethernet/freescale/Kconfig

[PATCH net-next v2 02/10] net: freescale: ucc_geth: split adjust_link for phylink conversion

2024-11-14 Thread Maxime Chevallier
Preparing the phylink conversion, split the adjust_link callbaclk, by clearly separating the mac configuration, link_up and link_down phases. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V2: No changes. Russell, I did see your comment with regards to the overall usefulness of

[PATCH net-next v2 05/10] net: freescale: ucc_geth: Use the correct type to store WoL opts

2024-11-14 Thread Maxime Chevallier
The WoL opts are represented through a bitmask stored in a u32. As this mask is copied as-is in the driver, make sure we use the exact same type to store them internally. Signed-off-by: Maxime Chevallier --- V2: New patch drivers/net/ethernet/freescale/ucc_geth.h | 2 +- 1 file changed, 1

[PATCH net-next v3 01/10] net: freescale: ucc_geth: Drop support for the "interface" DT property

2024-12-03 Thread Maxime Chevallier
th that property gone, we can greatly simplify the parsing of the phy-interface-mode from the devicetree by using of_get_phy_mode(), allowing the removal of the open-coded parsing in the driver. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V3 : Return an error code on failure. I ke

[PATCH net-next v3 07/10] net: freescale: ucc_geth: Hardcode the preamble length to 7 bytes

2024-12-03 Thread Maxime Chevallier
. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V3: No changes drivers/net/ethernet/freescale/ucc_geth.c | 21 - drivers/net/ethernet/freescale/ucc_geth.h | 4 ++-- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/drivers/net/ethernet/freescale

[PATCH net-next v3 00/10] net: freescale: ucc_geth: Phylink conversion

2024-12-03 Thread Maxime Chevallier
re.kernel.org/netdev/20241107170255.1058124-1-maxime.chevall...@bootlin.com/ Link to V2: https://lore.kernel.org/netdev/20241114153603.307872-1-maxime.chevall...@bootlin.com/ Maxime Chevallier (10): net: freescale: ucc_geth: Drop support for the "interface" DT property net: freescale: u

[PATCH net-next v3 06/10] net: freescale: ucc_geth: Simplify frame length check

2024-12-03 Thread Maxime Chevallier
ed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V3: No changes drivers/net/ethernet/freescale/ucc_geth.c | 21 +++-- drivers/net/ethernet/freescale/ucc_geth.h | 1 - 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/dr

[PATCH net-next v3 10/10] net: freescale: ucc_geth: phylink conversion

2024-12-03 Thread Maxime Chevallier
ucc_geth is quite capable in terms of supported interfaces, and even includes an externally controlled PCS (well, TBI). Port that driver to phylink. Signed-off-by: Maxime Chevallier --- V3: After adjusting patch 1, I also had to adjust the jump label in this patch for the probe error handling

[PATCH net-next v3 03/10] net: freescale: ucc_geth: Use netdev->phydev to access the PHY

2024-12-03 Thread Maxime Chevallier
As this driver pre-dates phylib, it uses a private pointer to get a reference to the attached phy_device. Drop that pointer and use the netdev's pointer instead. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V3: No changes drivers/net/ethernet/freescale/ucc_geth.c

[PATCH net-next v3 04/10] net: freescale: ucc_geth: Fix WOL configuration

2024-12-03 Thread Maxime Chevallier
The get/set_wol ethtool ops rely on querying the PHY for its WoL capabilities, checking for the presence of a PHY and a PHY interrupts isn't enough. Address that by cleaning up the WoL configuration sequence. Signed-off-by: Maxime Chevallier --- V3: No changes drivers/net/ethernet/free

[PATCH net-next v3 08/10] net: freescale: ucc_geth: Move the serdes configuration around

2024-12-03 Thread Maxime Chevallier
ommit moves the function without any feature change. Signed-off-by: Maxime Chevallier --- V3: No changes drivers/net/ethernet/freescale/ucc_geth.c | 93 +++ 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/eth

[PATCH net-next v3 02/10] net: freescale: ucc_geth: split adjust_link for phylink conversion

2024-12-03 Thread Maxime Chevallier
Preparing the phylink conversion, split the adjust_link callbaclk, by clearly separating the mac configuration, link_up and link_down phases. Reviewed-by: Andrew Lunn Signed-off-by: Maxime Chevallier --- V3: No changes drivers/net/ethernet/freescale/ucc_geth.c | 180 +++--- 1

[PATCH net-next v3 09/10] net: freescale: ucc_geth: Introduce a helper to check Reduced modes

2024-12-03 Thread Maxime Chevallier
that needs to be set when the MII mode is one of the supported reduced modes. Add a local helper for that. Signed-off-by: Maxime Chevallier --- V3: No changes drivers/net/ethernet/freescale/ucc_geth.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/ne

[PATCH net-next v3 05/10] net: freescale: ucc_geth: Use the correct type to store WoL opts

2024-12-03 Thread Maxime Chevallier
The WoL opts are represented through a bitmask stored in a u32. As this mask is copied as-is in the driver, make sure we use the exact same type to store them internally. Signed-off-by: Maxime Chevallier --- V3: No changes drivers/net/ethernet/freescale/ucc_geth.h | 2 +- 1 file changed, 1

Re: [PATCH net-next v3 09/10] net: freescale: ucc_geth: Introduce a helper to check Reduced modes

2024-12-04 Thread Maxime Chevallier
On Wed, 4 Dec 2024 16:41:33 +0100 Andrew Lunn wrote: > On Wed, Dec 04, 2024 at 09:22:32AM +0100, Maxime Chevallier wrote: > > Hello Andrew, > > > > On Wed, 4 Dec 2024 03:15:52 +0100 > > Andrew Lunn wrote: > > > > > > +static bool phy_interf

Re: [PATCH net-next v3 09/10] net: freescale: ucc_geth: Introduce a helper to check Reduced modes

2024-12-04 Thread Maxime Chevallier
Hello Andrew, On Wed, 4 Dec 2024 03:15:52 +0100 Andrew Lunn wrote: > > +static bool phy_interface_mode_is_reduced(phy_interface_t interface) > > +{ > > + return phy_interface_mode_is_rgmii(interface) || > > + interface == PHY_INTERFACE_MODE_RMII || > > + interface == PHY_INTE

Re: [PATCH] net: freescale: ucc_geth: make ugeth_mac_ops be static

2025-02-14 Thread Maxime Chevallier
kernel test robot > Closes: > https://lore.kernel.org/oe-kbuild-all/202502141128.9hfxcdie-...@intel.com/ > Fixes: 53036aa8d031 ("net: freescale: ucc_geth: phylink conversion") > Signed-off-by: Pei Xiao Thanks for fixing this, Reviewed-by: Maxime Chevallier Maxime