* [PATCH] net: mdio: meson-gxl set 28th bit in eth_reg2
@ 2024-05-21 18:56 Da Xue
2024-05-21 19:07 ` Andrew Lunn
2024-05-21 19:24 ` Russell King (Oracle)
0 siblings, 2 replies; 4+ messages in thread
From: Da Xue @ 2024-05-21 18:56 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl, netdev,
linux-arm-kernel, linux-amlogic, linux-kernel
Cc: linux-stable
This bit is necessary to enable packets on the interface. Without this
bit set, ethernet behaves as if it is working but no activity occurs.
The vendor SDK sets this bit along with the PHY_ID bits. u-boot will set
this bit as well but if u-boot is not compiled with networking, the
interface will not work.
Fixes: 9a24e1ff4326 ("net: mdio: add amlogic gxl mdio mux support");
Signed-off-by: Da Xue <da@libre.computer>
---
drivers/net/mdio/mdio-mux-meson-gxl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mdio/mdio-mux-meson-gxl.c
b/drivers/net/mdio/mdio-mux-meson-gxl.c
index 89554021b5cc..b2bd57f54034 100644
--- a/drivers/net/mdio/mdio-mux-meson-gxl.c
+++ b/drivers/net/mdio/mdio-mux-meson-gxl.c
@@ -17,6 +17,7 @@
#define REG2_LEDACT GENMASK(23, 22)
#define REG2_LEDLINK GENMASK(25, 24)
#define REG2_DIV4SEL BIT(27)
+#define REG2_RESERVED_28 BIT(28)
#define REG2_ADCBYPASS BIT(30)
#define REG2_CLKINSEL BIT(31)
#define ETH_REG3 0x4
@@ -65,7 +66,7 @@ static void gxl_enable_internal_mdio(struct
gxl_mdio_mux *priv)
* The only constraint is that it must match the one in
* drivers/net/phy/meson-gxl.c to properly match the PHY.
*/
- writel(FIELD_PREP(REG2_PHYID, EPHY_GXL_ID),
+ writel(REG2_RESERVED_28 | FIELD_PREP(REG2_PHYID, EPHY_GXL_ID),
priv->regs + ETH_REG2);
/* Enable the internal phy */
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] net: mdio: meson-gxl set 28th bit in eth_reg2
2024-05-21 18:56 [PATCH] net: mdio: meson-gxl set 28th bit in eth_reg2 Da Xue
@ 2024-05-21 19:07 ` Andrew Lunn
2024-05-21 19:24 ` Russell King (Oracle)
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2024-05-21 19:07 UTC (permalink / raw)
To: Da Xue
Cc: Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Neil Armstrong, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, netdev, linux-arm-kernel,
linux-amlogic, linux-kernel, linux-stable
On Tue, May 21, 2024 at 02:56:45PM -0400, Da Xue wrote:
> This bit is necessary to enable packets on the interface. Without this
> bit set, ethernet behaves as if it is working but no activity occurs.
>
> The vendor SDK sets this bit along with the PHY_ID bits. u-boot will set
> this bit as well but if u-boot is not compiled with networking, the
> interface will not work.
>
> Fixes: 9a24e1ff4326 ("net: mdio: add amlogic gxl mdio mux support");
>
> Signed-off-by: Da Xue <da@libre.computer>
Please don't put blank lines between tags.
If you intend that this patch is backported to stable, please add
Cc: stable@vger.kernel.org
Also please read:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#netdev-faq
particularly the bit about indicating the tree in the Subject:
Andrew
---
pw-bot: cr
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] net: mdio: meson-gxl set 28th bit in eth_reg2
2024-05-21 18:56 [PATCH] net: mdio: meson-gxl set 28th bit in eth_reg2 Da Xue
2024-05-21 19:07 ` Andrew Lunn
@ 2024-05-21 19:24 ` Russell King (Oracle)
2024-05-21 19:30 ` Da Xue
1 sibling, 1 reply; 4+ messages in thread
From: Russell King (Oracle) @ 2024-05-21 19:24 UTC (permalink / raw)
To: Da Xue
Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Neil Armstrong, Kevin Hilman,
Jerome Brunet, Martin Blumenstingl, netdev, linux-arm-kernel,
linux-amlogic, linux-kernel, linux-stable
On Tue, May 21, 2024 at 02:56:45PM -0400, Da Xue wrote:
> @@ -65,7 +66,7 @@ static void gxl_enable_internal_mdio(struct
> gxl_mdio_mux *priv)
> * The only constraint is that it must match the one in
> * drivers/net/phy/meson-gxl.c to properly match the PHY.
> */
> - writel(FIELD_PREP(REG2_PHYID, EPHY_GXL_ID),
> + writel(REG2_RESERVED_28 | FIELD_PREP(REG2_PHYID, EPHY_GXL_ID),
> priv->regs + ETH_REG2);
>
> /* Enable the internal phy */
In addition to what Andrew said, you need to look at how you're sending
patches - this patch looks like it has been whitespace damaged, which
means it can't be applied.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: mdio: meson-gxl set 28th bit in eth_reg2
2024-05-21 19:24 ` Russell King (Oracle)
@ 2024-05-21 19:30 ` Da Xue
0 siblings, 0 replies; 4+ messages in thread
From: Da Xue @ 2024-05-21 19:30 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Da Xue, Andrew Lunn, Heiner Kallweit, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Neil Armstrong,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl, netdev,
linux-arm-kernel, linux-amlogic, linux-kernel, linux-stable
On Tue, May 21, 2024 at 3:24 PM Russell King (Oracle)
<linux@armlinux.org.uk> wrote:
>
> On Tue, May 21, 2024 at 02:56:45PM -0400, Da Xue wrote:
> > @@ -65,7 +66,7 @@ static void gxl_enable_internal_mdio(struct
> > gxl_mdio_mux *priv)
> > * The only constraint is that it must match the one in
> > * drivers/net/phy/meson-gxl.c to properly match the PHY.
> > */
> > - writel(FIELD_PREP(REG2_PHYID, EPHY_GXL_ID),
> > + writel(REG2_RESERVED_28 | FIELD_PREP(REG2_PHYID, EPHY_GXL_ID),
> > priv->regs + ETH_REG2);
> >
> > /* Enable the internal phy */
>
> In addition to what Andrew said, you need to look at how you're sending
> patches - this patch looks like it has been whitespace damaged, which
> means it can't be applied.
Thanks for the feedback. There's 2 reserved ranges in that register
with no further descriptions available.
If naming the bit offset after the field range is OK, I will make edit
and submit a V2 though send-email.
>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-21 19:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-21 18:56 [PATCH] net: mdio: meson-gxl set 28th bit in eth_reg2 Da Xue
2024-05-21 19:07 ` Andrew Lunn
2024-05-21 19:24 ` Russell King (Oracle)
2024-05-21 19:30 ` Da Xue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox