diff mbox series

[net] net: phy: meson-gxl: use MMD access dummy stubs for GXL, internal PHY

Message ID 23ecd290-56fb-699a-8722-f405b723b763@gmail.com (mailing list archive)
State New, archived
Headers show
Series [net] net: phy: meson-gxl: use MMD access dummy stubs for GXL, internal PHY | expand

Commit Message

Heiner Kallweit Jan. 31, 2023, 9:03 p.m. UTC
Jerome provided the information that also the GXL internal PHY doesn't
support MMD register access and EEE. MMD reads return 0xffff, what
results in e.g. completely wrong ethtool --show-eee output.
Therefore use the MMD dummy stubs.

Note: The Fixes tag references the commit that added the MMD dummy
access stubs.

Fixes: 5df7af85ecd8 ("net: phy: Add general dummy stubs for MMD register access")
Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/meson-gxl.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Chris Healy Jan. 31, 2023, 9:07 p.m. UTC | #1
Reviewed-by: Chris Healy <healych@amazon.com>

On Tue, Jan 31, 2023 at 1:03 PM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> Jerome provided the information that also the GXL internal PHY doesn't
> support MMD register access and EEE. MMD reads return 0xffff, what
> results in e.g. completely wrong ethtool --show-eee output.
> Therefore use the MMD dummy stubs.
>
> Note: The Fixes tag references the commit that added the MMD dummy
> access stubs.
>
> Fixes: 5df7af85ecd8 ("net: phy: Add general dummy stubs for MMD register access")
> Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  drivers/net/phy/meson-gxl.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c
> index c49062ad7..fbf5f2416 100644
> --- a/drivers/net/phy/meson-gxl.c
> +++ b/drivers/net/phy/meson-gxl.c
> @@ -261,6 +261,8 @@ static struct phy_driver meson_gxl_phy[] = {
>                 .handle_interrupt = meson_gxl_handle_interrupt,
>                 .suspend        = genphy_suspend,
>                 .resume         = genphy_resume,
> +               .read_mmd       = genphy_read_mmd_unsupported,
> +               .write_mmd      = genphy_write_mmd_unsupported,
>         }, {
>                 PHY_ID_MATCH_EXACT(0x01803301),
>                 .name           = "Meson G12A Internal PHY",
> --
> 2.39.1
>
Jakub Kicinski Feb. 1, 2023, 5:55 a.m. UTC | #2
On Tue, 31 Jan 2023 22:03:21 +0100 Heiner Kallweit wrote:
> Jerome provided the information that also the GXL internal PHY doesn't
> support MMD register access and EEE. MMD reads return 0xffff, what
> results in e.g. completely wrong ethtool --show-eee output.
> Therefore use the MMD dummy stubs.
> 
> Note: The Fixes tag references the commit that added the MMD dummy
> access stubs.
> 
> Fixes: 5df7af85ecd8 ("net: phy: Add general dummy stubs for MMD register access")

Please make sure to CC the author. Adding Kevin Hao <haokexin@gmail.com>
Kevin Hao Feb. 1, 2023, 12:45 p.m. UTC | #3
On Tue, Jan 31, 2023 at 09:55:28PM -0800, Jakub Kicinski wrote:
> On Tue, 31 Jan 2023 22:03:21 +0100 Heiner Kallweit wrote:
> > Jerome provided the information that also the GXL internal PHY doesn't
> > support MMD register access and EEE. MMD reads return 0xffff, what
> > results in e.g. completely wrong ethtool --show-eee output.
> > Therefore use the MMD dummy stubs.
> > 
> > Note: The Fixes tag references the commit that added the MMD dummy
> > access stubs.
> > 
> > Fixes: 5df7af85ecd8 ("net: phy: Add general dummy stubs for MMD register access")
> 
> Please make sure to CC the author. Adding Kevin Hao <haokexin@gmail.com>

The changes look fine to me, but the using of the "Fixes" tag seems a bit weird.
The "Fixes" tag is used to specify the commit causing regression instead of patch prerequisite.

Thanks,
Kevin
Chris Healy Feb. 1, 2023, 3:16 p.m. UTC | #4
On Tue, Jan 31, 2023 at 9:55 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 31 Jan 2023 22:03:21 +0100 Heiner Kallweit wrote:
> > Jerome provided the information that also the GXL internal PHY doesn't
> > support MMD register access and EEE. MMD reads return 0xffff, what
> > results in e.g. completely wrong ethtool --show-eee output.
> > Therefore use the MMD dummy stubs.
> >
> > Note: The Fixes tag references the commit that added the MMD dummy
> > access stubs.
> >
> > Fixes: 5df7af85ecd8 ("net: phy: Add general dummy stubs for MMD register access")
>
> Please make sure to CC the author. Adding Kevin Hao <haokexin@gmail.com>

Good point, I'll do that next time.
diff mbox series

Patch

diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c
index c49062ad7..fbf5f2416 100644
--- a/drivers/net/phy/meson-gxl.c
+++ b/drivers/net/phy/meson-gxl.c
@@ -261,6 +261,8 @@  static struct phy_driver meson_gxl_phy[] = {
 		.handle_interrupt = meson_gxl_handle_interrupt,
 		.suspend        = genphy_suspend,
 		.resume         = genphy_resume,
+		.read_mmd	= genphy_read_mmd_unsupported,
+		.write_mmd	= genphy_write_mmd_unsupported,
 	}, {
 		PHY_ID_MATCH_EXACT(0x01803301),
 		.name		= "Meson G12A Internal PHY",