* [PATCH net v1] net: phy: micrel: Correct bit assignment for MICREL_KSZ8_P1_ERRATA flag
@ 2023-08-31 11:04 Oleksij Rempel
2023-08-31 11:20 ` Russell King (Oracle)
0 siblings, 1 reply; 4+ messages in thread
From: Oleksij Rempel @ 2023-08-31 11:04 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: Oleksij Rempel, kernel, linux-kernel, Russell King, netdev,
Lukasz Majewski
The previous assignment of the phy_device quirk for the
MICREL_KSZ8_P1_ERRATA flag was incorrect, working only due to
coincidental conditions. Specifically:
- The flag MICREL_KSZ8_P1_ERRATA, intended for KSZ88xx switches, was
mistakenly overlapping with the MICREL_PHY_FXEN and
MICREL_PHY_50MHZ_CLK flags.
- MICREL_PHY_FXEN is used by the KSZ8041 PHY, and its related code path
wasn't executed for KSZ88xx PHYs and other way around.
- Additionally, the code path associated with the MICREL_PHY_50MHZ_CLK
flag wasn't executed for KSZ88xx either.
Fixes: 49011e0c1555d ("net: phy: micrel: ksz886x/ksz8081: add cabletest support")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
include/linux/micrel_phy.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index 8bef1ab62bba3..0cedbeb9167c3 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -43,7 +43,7 @@
/* struct phy_device dev_flags definitions */
#define MICREL_PHY_50MHZ_CLK 0x00000001
#define MICREL_PHY_FXEN 0x00000002
-#define MICREL_KSZ8_P1_ERRATA 0x00000003
+#define MICREL_KSZ8_P1_ERRATA BIT(3)
#define MICREL_KSZ9021_EXTREG_CTRL 0xB
#define MICREL_KSZ9021_EXTREG_DATA_WRITE 0xC
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v1] net: phy: micrel: Correct bit assignment for MICREL_KSZ8_P1_ERRATA flag
2023-08-31 11:04 [PATCH net v1] net: phy: micrel: Correct bit assignment for MICREL_KSZ8_P1_ERRATA flag Oleksij Rempel
@ 2023-08-31 11:20 ` Russell King (Oracle)
2023-08-31 11:23 ` Oleksij Rempel
0 siblings, 1 reply; 4+ messages in thread
From: Russell King (Oracle) @ 2023-08-31 11:20 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, kernel, linux-kernel, netdev,
Lukasz Majewski
On Thu, Aug 31, 2023 at 01:04:27PM +0200, Oleksij Rempel wrote:
> The previous assignment of the phy_device quirk for the
> MICREL_KSZ8_P1_ERRATA flag was incorrect, working only due to
> coincidental conditions. Specifically:
>
> - The flag MICREL_KSZ8_P1_ERRATA, intended for KSZ88xx switches, was
> mistakenly overlapping with the MICREL_PHY_FXEN and
> MICREL_PHY_50MHZ_CLK flags.
> - MICREL_PHY_FXEN is used by the KSZ8041 PHY, and its related code path
> wasn't executed for KSZ88xx PHYs and other way around.
> - Additionally, the code path associated with the MICREL_PHY_50MHZ_CLK
> flag wasn't executed for KSZ88xx either.
>
> Fixes: 49011e0c1555d ("net: phy: micrel: ksz886x/ksz8081: add cabletest support")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> include/linux/micrel_phy.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
> index 8bef1ab62bba3..0cedbeb9167c3 100644
> --- a/include/linux/micrel_phy.h
> +++ b/include/linux/micrel_phy.h
> @@ -43,7 +43,7 @@
> /* struct phy_device dev_flags definitions */
> #define MICREL_PHY_50MHZ_CLK 0x00000001
> #define MICREL_PHY_FXEN 0x00000002
> -#define MICREL_KSZ8_P1_ERRATA 0x00000003
> +#define MICREL_KSZ8_P1_ERRATA BIT(3)
Please can you also convert the other two flags to use BIT() as well to
make the entire thing explicitly bit-orientated? Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v1] net: phy: micrel: Correct bit assignment for MICREL_KSZ8_P1_ERRATA flag
2023-08-31 11:20 ` Russell King (Oracle)
@ 2023-08-31 11:23 ` Oleksij Rempel
2023-09-01 1:33 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: Oleksij Rempel @ 2023-08-31 11:23 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, kernel, linux-kernel, netdev,
Lukasz Majewski
On Thu, Aug 31, 2023 at 12:20:17PM +0100, Russell King (Oracle) wrote:
> On Thu, Aug 31, 2023 at 01:04:27PM +0200, Oleksij Rempel wrote:
> > The previous assignment of the phy_device quirk for the
> > MICREL_KSZ8_P1_ERRATA flag was incorrect, working only due to
> > coincidental conditions. Specifically:
> >
> > - The flag MICREL_KSZ8_P1_ERRATA, intended for KSZ88xx switches, was
> > mistakenly overlapping with the MICREL_PHY_FXEN and
> > MICREL_PHY_50MHZ_CLK flags.
> > - MICREL_PHY_FXEN is used by the KSZ8041 PHY, and its related code path
> > wasn't executed for KSZ88xx PHYs and other way around.
> > - Additionally, the code path associated with the MICREL_PHY_50MHZ_CLK
> > flag wasn't executed for KSZ88xx either.
> >
> > Fixes: 49011e0c1555d ("net: phy: micrel: ksz886x/ksz8081: add cabletest support")
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > ---
> > include/linux/micrel_phy.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
> > index 8bef1ab62bba3..0cedbeb9167c3 100644
> > --- a/include/linux/micrel_phy.h
> > +++ b/include/linux/micrel_phy.h
> > @@ -43,7 +43,7 @@
> > /* struct phy_device dev_flags definitions */
> > #define MICREL_PHY_50MHZ_CLK 0x00000001
> > #define MICREL_PHY_FXEN 0x00000002
> > -#define MICREL_KSZ8_P1_ERRATA 0x00000003
> > +#define MICREL_KSZ8_P1_ERRATA BIT(3)
>
> Please can you also convert the other two flags to use BIT() as well to
> make the entire thing explicitly bit-orientated? Thanks.
Ack. This patch is for the net. The cleanup will got to the net-next.
Except clean up will be accepted for the net too?
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v1] net: phy: micrel: Correct bit assignment for MICREL_KSZ8_P1_ERRATA flag
2023-08-31 11:23 ` Oleksij Rempel
@ 2023-09-01 1:33 ` Jakub Kicinski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2023-09-01 1:33 UTC (permalink / raw)
To: Oleksij Rempel
Cc: Russell King (Oracle), Andrew Lunn, Heiner Kallweit,
David S. Miller, Eric Dumazet, Paolo Abeni, kernel, linux-kernel,
netdev, Lukasz Majewski
On Thu, 31 Aug 2023 13:23:42 +0200 Oleksij Rempel wrote:
> > > /* struct phy_device dev_flags definitions */
> > > #define MICREL_PHY_50MHZ_CLK 0x00000001
> > > #define MICREL_PHY_FXEN 0x00000002
> > > -#define MICREL_KSZ8_P1_ERRATA 0x00000003
> > > +#define MICREL_KSZ8_P1_ERRATA BIT(3)
> >
> > Please can you also convert the other two flags to use BIT() as well to
> > make the entire thing explicitly bit-orientated? Thanks.
>
> Ack. This patch is for the net. The cleanup will got to the net-next.
> Except clean up will be accepted for the net too?
The change is simple enough, you can convert all three bits in the fix.
The commit message could more explicitly say that these defines are
supposed to be masks not bit positions, tho.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-01 1:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31 11:04 [PATCH net v1] net: phy: micrel: Correct bit assignment for MICREL_KSZ8_P1_ERRATA flag Oleksij Rempel
2023-08-31 11:20 ` Russell King (Oracle)
2023-08-31 11:23 ` Oleksij Rempel
2023-09-01 1:33 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).