* [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register"
@ 2019-08-14 10:29 Bin Meng
2019-08-14 18:57 ` Joe Hershberger
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Bin Meng @ 2019-08-14 10:29 UTC (permalink / raw)
To: u-boot
This reverts commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed.
Commit 1b0c9914cc75 ("net: macb: Fixed reading MII_LPA register")
causes 100Mbps does not work any more with SiFive FU540 GEM on the
HiFive Unleashed board. Revert it.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---
drivers/net/macb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index c99cf66..25f7913 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -643,7 +643,7 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
/* First check for GMAC and that it is GiB capable */
if (gem_is_gigabit_capable(macb)) {
- lpa = macb_mdio_read(macb, MII_LPA);
+ lpa = macb_mdio_read(macb, MII_STAT1000);
if (lpa & (LPA_1000FULL | LPA_1000HALF | LPA_1000XFULL |
LPA_1000XHALF)) {
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register"
2019-08-14 10:29 [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register" Bin Meng
@ 2019-08-14 18:57 ` Joe Hershberger
2019-09-04 11:50 ` Bin Meng
2019-08-16 2:46 ` Anup Patel
2019-09-04 16:41 ` [U-Boot] " Joe Hershberger
2 siblings, 1 reply; 8+ messages in thread
From: Joe Hershberger @ 2019-08-14 18:57 UTC (permalink / raw)
To: u-boot
Hi Radu,
Is there something you can switch on to select the correct register on
the appropriate platform?
On Wed, Aug 14, 2019 at 5:31 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> This reverts commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed.
>
> Commit 1b0c9914cc75 ("net: macb: Fixed reading MII_LPA register")
> causes 100Mbps does not work any more with SiFive FU540 GEM on the
> HiFive Unleashed board. Revert it.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register"
2019-08-14 10:29 [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register" Bin Meng
2019-08-14 18:57 ` Joe Hershberger
@ 2019-08-16 2:46 ` Anup Patel
2019-08-16 14:19 ` Bin Meng
2019-09-04 16:41 ` [U-Boot] " Joe Hershberger
2 siblings, 1 reply; 8+ messages in thread
From: Anup Patel @ 2019-08-16 2:46 UTC (permalink / raw)
To: u-boot
On Wed, Aug 14, 2019 at 4:01 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> This reverts commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed.
>
> Commit 1b0c9914cc75 ("net: macb: Fixed reading MII_LPA register")
> causes 100Mbps does not work any more with SiFive FU540 GEM on the
> HiFive Unleashed board. Revert it.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
> drivers/net/macb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index c99cf66..25f7913 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -643,7 +643,7 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
>
> /* First check for GMAC and that it is GiB capable */
> if (gem_is_gigabit_capable(macb)) {
> - lpa = macb_mdio_read(macb, MII_LPA);
> + lpa = macb_mdio_read(macb, MII_STAT1000);
You can do this selectively by having boolean flag in macb_config which is
only set for SiFive Unleashed.
Regards,
Anup
>
> if (lpa & (LPA_1000FULL | LPA_1000HALF | LPA_1000XFULL |
> LPA_1000XHALF)) {
> --
> 2.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register"
2019-08-16 2:46 ` Anup Patel
@ 2019-08-16 14:19 ` Bin Meng
0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2019-08-16 14:19 UTC (permalink / raw)
To: u-boot
On Fri, Aug 16, 2019 at 10:46 AM Anup Patel <anup@brainfault.org> wrote:
>
> On Wed, Aug 14, 2019 at 4:01 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > This reverts commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed.
> >
> > Commit 1b0c9914cc75 ("net: macb: Fixed reading MII_LPA register")
> > causes 100Mbps does not work any more with SiFive FU540 GEM on the
> > HiFive Unleashed board. Revert it.
> >
> > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> > ---
> >
> > drivers/net/macb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> > index c99cf66..25f7913 100644
> > --- a/drivers/net/macb.c
> > +++ b/drivers/net/macb.c
> > @@ -643,7 +643,7 @@ static int macb_phy_init(struct macb_device *macb, const char *name)
> >
> > /* First check for GMAC and that it is GiB capable */
> > if (gem_is_gigabit_capable(macb)) {
> > - lpa = macb_mdio_read(macb, MII_LPA);
> > + lpa = macb_mdio_read(macb, MII_STAT1000);
>
> You can do this selectively by having boolean flag in macb_config which is
> only set for SiFive Unleashed.
That does not look clean to me. I actually don't understand what the
issue the previous patch was trying to fix.
Maybe until we know that better we need revert to original codes...
Regards,
Bin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register"
2019-08-14 18:57 ` Joe Hershberger
@ 2019-09-04 11:50 ` Bin Meng
2019-09-04 15:39 ` Joe Hershberger
0 siblings, 1 reply; 8+ messages in thread
From: Bin Meng @ 2019-09-04 11:50 UTC (permalink / raw)
To: u-boot
Hi Joe,
On Thu, Aug 15, 2019 at 3:03 AM Joe Hershberger <joe.hershberger@ni.com> wrote:
>
> Hi Radu,
>
> Is there something you can switch on to select the correct register on
> the appropriate platform?
>
> On Wed, Aug 14, 2019 at 5:31 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > This reverts commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed.
> >
> > Commit 1b0c9914cc75 ("net: macb: Fixed reading MII_LPA register")
> > causes 100Mbps does not work any more with SiFive FU540 GEM on the
> > HiFive Unleashed board. Revert it.
> >
> > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Could you please pick this patch for v2019.10?
Regards,
Bin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register"
2019-09-04 11:50 ` Bin Meng
@ 2019-09-04 15:39 ` Joe Hershberger
2019-09-04 16:15 ` Bin Meng
0 siblings, 1 reply; 8+ messages in thread
From: Joe Hershberger @ 2019-09-04 15:39 UTC (permalink / raw)
To: u-boot
Hi Bin,
On Wed, Sep 4, 2019 at 6:51 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Joe,
>
> On Thu, Aug 15, 2019 at 3:03 AM Joe Hershberger <joe.hershberger@ni.com> wrote:
> >
> > Hi Radu,
> >
> > Is there something you can switch on to select the correct register on
> > the appropriate platform?
> >
> > On Wed, Aug 14, 2019 at 5:31 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> > >
> > > This reverts commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed.
> > >
> > > Commit 1b0c9914cc75 ("net: macb: Fixed reading MII_LPA register")
> > > causes 100Mbps does not work any more with SiFive FU540 GEM on the
> > > HiFive Unleashed board. Revert it.
> > >
> > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> >
> > Acked-by: Joe Hershberger <joe.hershberger@ni.com>
>
> Could you please pick this patch for v2019.10?
Yes. It's already build-tested and I will send a PR later today.
Cheers,
-Joe
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register"
2019-09-04 15:39 ` Joe Hershberger
@ 2019-09-04 16:15 ` Bin Meng
0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2019-09-04 16:15 UTC (permalink / raw)
To: u-boot
On Wed, Sep 4, 2019 at 11:39 PM Joe Hershberger <joe.hershberger@ni.com> wrote:
>
> Hi Bin,
>
> On Wed, Sep 4, 2019 at 6:51 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > Hi Joe,
> >
> > On Thu, Aug 15, 2019 at 3:03 AM Joe Hershberger <joe.hershberger@ni.com> wrote:
> > >
> > > Hi Radu,
> > >
> > > Is there something you can switch on to select the correct register on
> > > the appropriate platform?
> > >
> > > On Wed, Aug 14, 2019 at 5:31 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> > > >
> > > > This reverts commit 1b0c9914cc75d1570359181ebd493cd5746cb0ed.
> > > >
> > > > Commit 1b0c9914cc75 ("net: macb: Fixed reading MII_LPA register")
> > > > causes 100Mbps does not work any more with SiFive FU540 GEM on the
> > > > HiFive Unleashed board. Revert it.
> > > >
> > > > Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> > >
> > > Acked-by: Joe Hershberger <joe.hershberger@ni.com>
> >
> > Could you please pick this patch for v2019.10?
>
> Yes. It's already build-tested and I will send a PR later today.
Thank you Joe!
Regards,
Bin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] Revert "net: macb: Fixed reading MII_LPA register"
2019-08-14 10:29 [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register" Bin Meng
2019-08-14 18:57 ` Joe Hershberger
2019-08-16 2:46 ` Anup Patel
@ 2019-09-04 16:41 ` Joe Hershberger
2 siblings, 0 replies; 8+ messages in thread
From: Joe Hershberger @ 2019-09-04 16:41 UTC (permalink / raw)
To: u-boot
Hi Bin,
https://patchwork.ozlabs.org/patch/1146935/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks!
-Joe
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-09-04 16:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14 10:29 [U-Boot] [PATCH] Revert "net: macb: Fixed reading MII_LPA register" Bin Meng
2019-08-14 18:57 ` Joe Hershberger
2019-09-04 11:50 ` Bin Meng
2019-09-04 15:39 ` Joe Hershberger
2019-09-04 16:15 ` Bin Meng
2019-08-16 2:46 ` Anup Patel
2019-08-16 14:19 ` Bin Meng
2019-09-04 16:41 ` [U-Boot] " Joe Hershberger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.