On Mon, Jul 27, 2020 at 8:24 AM Laurent Pinchart <laurent.pinch...@ideasonboard.com> wrote: > > Hi Andrew, > > On Mon, Jul 27, 2020 at 02:05:45PM +0200, Andrew Lunn wrote: > > On Sun, Jul 26, 2020 at 08:01:25PM -0700, Chris Healy wrote: > > > 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: > > > > Hi Chris > > > > Is this a mainline supported board? Do you plan to submit a patch? > > > > Laurent, does the change also work for your board? This is another one > > of those cases were a bug in the PHY driver, not respecting the > > phy-mode, has masked a bug in the device tree, using the wrong > > phy-mode. We had the same issue with the Atheros PHY a while back. > > Yes, setting the phy-mode to rgmii-id fixes the issue. > > Thank you everybody for your quick responses and very useful help ! > > On a side note, when the kernel boots, there's a ~10s delay for the > ethernet connection to come up: > > [ 4.050754] Micrel KSZ9031 Gigabit PHY 30be0000.ethernet-1:01: attached > PHY driver [Micrel KSZ9031 Gigabit PHY] > (mii_bus:phy_addr=30be0000.ethernet-1:01, irq=POLL) > [ 15.628528] fec 30be0000.ethernet eth0: Link is Up - 1Gbps/Full - flow > control rx/tx > [ 15.676961] Sending DHCP requests ., OK > [ 15.720925] IP-Config: Got DHCP answer from 192.168.2.47, my address is > 192.168.2.210 > > The LED on the connected switch confirms this, it lits up synchronously > with the "Link is up" message. It's not an urgent issue, but if someone > had a few pointers on how I could debug that, it would be appreciated.
Here's a few suggestions that could help in learning more: 1) Review the KSZ9031 HW errata and compare against the PHY driver code. There's a number of errata that could cause this from my quick review. 2) Based on what I read in the HW errata, try different link partners that utilize different copper PHYs to see if it results in different behaviour. 3) Try setting your autonegotiate advertisement to only advertise 100Mbps and see if this affects the timing. Obviously this would not be a solution but might help in better understanding the issue. > > -- > Regards, > > Laurent Pinchart