All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Duan <fugang.duan@nxp.com>
To: Chris Healy <cphealy@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Martin Fuzzey <martin.fuzzey@flowbird.group>
Subject: RE: [EXT] Re: [RESENT PATCH net--stat 1/1] net: ethernet: fec: Revert "net: ethernet: fec: Replace interrupt driven MDIO with polled IO"
Date: Mon, 27 Jul 2020 03:08:15 +0000	[thread overview]
Message-ID: <AM6PR0402MB36075CE615B74A3B299D53FDFF720@AM6PR0402MB3607.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAFXsbZpBP_kzsC_dLYezJWo7+dQufoRmaFpJgKJbnn6T=sc5QA@mail.gmail.com>

From: Chris Healy <cphealy@gmail.com> Sent: Monday, July 27, 2020 11:01 AM
> It appears quite a few boards were affected by this micrel PHY driver change:
> 
> 2ccb0161a0e9eb06f538557d38987e436fc39b8d
> 80bf72598663496d08b3c0231377db6a99d7fd68
> 2de00450c0126ec8838f72157577578e85cae5d8
> 820f8a870f6575acda1bf7f1a03c701c43ed5d79
> 
> I just updated the phy-mode with my board from rgmii to rgmii-id and
> everything started working fine with net-next again:
> 
> eth0      Link encap:Ethernet  HWaddr E6:85:48:8F:93:64
>           inet addr:172.16.1.1  Bcast:172.16.255.255  Mask:255.255.0.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:4643690 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:76178 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:2762845502 (2.5 GiB)  TX bytes:5026376 (4.7 MiB)
> 
> 

It is reasonable to change phy-mode to "rgmii-id" to let PHY supply
Tx/rx skew since MAC doesn't support delay.


Regards,
Fugang
> 
> On Sun, Jul 26, 2020 at 7:40 PM Chris Healy <cphealy@gmail.com> wrote:
> >
> > Actually, I was a little quick to say it went from broken to working.
> >
> > With net-next, I'm getting CRC errors on 100% of inbound packets.
> > With bcf3440c6dd78bfe5836ec0990fe36d7b4bb7d20 reverted, I drop down to
> > a 1% error rate.
> >
> > This very much feels like a KSZ9031 RGMII timing issue to me...
> >
> > On Sun, Jul 26, 2020 at 7:35 PM Chris Healy <cphealy@gmail.com> wrote:
> > >
> > > Hi Laurent,
> > >
> > > I have the exact same copper PHY.  I just reverted a patch specific
> > > to this PHY and went from broken to working.  Give this a try:
> > >
> > > git revert bcf3440c6dd78bfe5836ec0990fe36d7b4bb7d20
> > >
> > > Regards,
> > >
> > > Chris
> > >
> > > On Sun, Jul 26, 2020 at 7:33 PM Laurent Pinchart
> > > <laurent.pinchart@ideasonboard.com> wrote:
> > > >
> > > > Hi Andrew,
> > > >
> > > > On Mon, Jul 27, 2020 at 04:14:32AM +0200, Andrew Lunn wrote:
> > > > > On Mon, Jul 27, 2020 at 05:06:31AM +0300, Laurent Pinchart wrote:
> > > > > > On Mon, Jul 27, 2020 at 04:24:02AM +0300, Laurent Pinchart wrote:
> > > > > > > On Mon, Apr 27, 2020 at 10:08:04PM +0800, Fugang Duan wrote:
> > > > > > > > This reverts commit
> 29ae6bd1b0d8a57d7c00ab12cbb949fc41986eef.
> > > > > > > >
> > > > > > > > The commit breaks ethernet function on i.MX6SX, i.MX7D,
> > > > > > > > i.MX8MM, i.MX8MQ, and i.MX8QXP platforms. Boot yocto
> > > > > > > > system by NFS mounting rootfs will be failed with the commit.
> > > > > > >
> > > > > > > I'm afraid this commit breaks networking on i.MX7D for me
> > > > > > > :-( My board is configured to boot over NFS root with IP
> > > > > > > autoconfiguration through DHCP. The DHCP request goes out,
> > > > > > > the reply it sent back by the server, but never noticed by the fec
> driver.
> > > > > > >
> > > > > > > v5.7 works fine. As 29ae6bd1b0d8a57d7c00ab12cbb949fc41986eef
> > > > > > > was merged during the v5.8 merge window, I suspect something
> > > > > > > else cropped in between
> > > > > > > 29ae6bd1b0d8a57d7c00ab12cbb949fc41986eef and this patch that
> > > > > > > needs to be reverted too. We're close to v5.8 and it would
> > > > > > > be annoying to see this regression ending up in the released
> > > > > > > kernel. I can test patches, but I'm not familiar enough with
> > > > > > > the driver (or the networking
> > > > > > > subsystem) to fix the issue myself.
> > > > > >
> > > > > > If it can be of any help, I've confirmed that, to get the
> > > > > > network back to usable state from v5.8-rc6, I have to revert
> > > > > > all patches up to this one. This is the top of my branch, on top of
> v5.8-rc6:
> > > > > >
> > > > > > 5bbe80c9efea Revert "net: ethernet: fec: Revert "net: ethernet: fec:
> Replace interrupt driven MDIO with polled IO""
> > > > > > 5462896a08c1 Revert "net: ethernet: fec: Replace interrupt driven
> MDIO with polled IO"
> > > > > > 824a82e2bdfa Revert "net: ethernet: fec: move GPR register offset
> and bit into DT"
> > > > > > bfe330591cab Revert "net: fec: disable correct clk in the err path of
> fec_enet_clk_enable"
> > > > > > 109958cad578 Revert "net: ethernet: fec: prevent tx starvation under
> high rx load"
> > > > >
> > > > > OK.
> > > > >
> > > > > What PHY are you using? A Micrel?
> > > >
> > > > KSZ9031RNXIA
> > > >
> > > > > And which DT file?
> > > >
> > > > It's out of tree.
> > > >
> > > > &fec1 {
> > > >         pinctrl-names = "default";
> > > >         pinctrl-0 = <&pinctrl_enet1>;
> > > >         assigned-clocks = <&clks IMX7D_ENET1_TIME_ROOT_SRC>,
> > > >                           <&clks
> IMX7D_ENET1_TIME_ROOT_CLK>;
> > > >         assigned-clock-parents = <&clks
> IMX7D_PLL_ENET_MAIN_100M_CLK>;
> > > >         assigned-clock-rates = <0>, <100000000>;
> > > >         phy-mode = "rgmii";
> > > >         phy-handle = <&ethphy0>;
> > > >         phy-reset-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
> > > >         phy-supply = <&reg_3v3_sw>;
> > > >         fsl,magic-packet;
> > > >         status = "okay";
> > > >
> > > >         mdio {
> > > >                 #address-cells = <1>;
> > > >                 #size-cells = <0>;
> > > >
> > > >                 ethphy0: ethernet-phy@0 {
> > > >                         reg = <1>;
> > > >                 };
> > > >
> > > >                 ethphy1: ethernet-phy@1 {
> > > >                         reg = <2>;
> > > >                 };
> > > >         };
> > > > };
> > > >
> > > > I can provide the full DT if needed.
> > > >
> > > > --
> > > > Regards,
> > > >
> > > > Laurent Pinchart

  reply	other threads:[~2020-07-27  3:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 14:08 [RESENT PATCH net--stat 1/1] net: ethernet: fec: Revert "net: ethernet: fec: Replace interrupt driven MDIO with polled IO" Fugang Duan
2020-05-01  3:31 ` David Miller
2020-07-27  1:23 ` Laurent Pinchart
2020-07-27  1:38   ` Andrew Lunn
2020-07-27  2:06   ` Laurent Pinchart
2020-07-27  2:13     ` Chris Healy
2020-07-27  2:21       ` [EXT] " Andy Duan
2020-07-27  2:36       ` Laurent Pinchart
2020-07-27  2:14     ` Andrew Lunn
2020-07-27  2:33       ` Laurent Pinchart
2020-07-27  2:35         ` Chris Healy
2020-07-27  2:39           ` Laurent Pinchart
2020-07-27  2:40           ` Chris Healy
2020-07-27  2:51             ` [EXT] " Andy Duan
2020-07-27  3:01             ` Chris Healy
2020-07-27  3:08               ` Andy Duan [this message]
2020-07-27 12:05               ` Andrew Lunn
2020-07-27 13:30                 ` Chris Healy
2020-07-27 15:24                 ` Laurent Pinchart
2020-07-27 15:41                   ` Chris Healy
2020-07-27 17:37                     ` Laurent Pinchart
2020-07-27 18:03                       ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR0402MB36075CE615B74A3B299D53FDFF720@AM6PR0402MB3607.eurprd04.prod.outlook.com \
    --to=fugang.duan@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=martin.fuzzey@flowbird.group \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.