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
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
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
- 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
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
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
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
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
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:
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
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
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
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
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
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
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
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
- 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
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
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
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++;
> >
> > -
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
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
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
- 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
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
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
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
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
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
->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
---
...
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
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
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
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 +
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
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
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
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_
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
.
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
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
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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
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
69 matches
Mail list logo