From: Daniel Wagner <dwagner@suse•de>
To: Russell King - ARM Linux admin <linux@armlinux•org.uk>
Cc: bcm-kernel-feedback-list@broadcom•com,
linux-rpi-kernel@lists•infradead.org,
linux-arm-kernel@lists•infradead.org
Subject: Re: lan78xx and phy_state_machine
Date: Mon, 14 Oct 2019 21:25:29 +0200 [thread overview]
Message-ID: <20191014192529.z7c5x6hzixxeplvw@beryllium.lan> (raw)
In-Reply-To: <20191014163004.GP25745@shell.armlinux.org.uk>
On Mon, Oct 14, 2019 at 05:30:04PM +0100, Russell King - ARM Linux admin wrote:
> On Mon, Oct 14, 2019 at 04:06:04PM +0200, Daniel Wagner wrote:
> > Hi,
> >
> > I've trying to boot a RPi 3 Model B+ in 64 bit mode. While I can get
> > my configuratin booting with v5.2.20, the current kernel v5.3.6 hangs
> > when initializing the eth interface.
> >
> > Is this a know issue? Some configuration issues?
>
> I don't see any successfully probed ethernet devices in the boot log, so
> I've no idea which of the multitude of ethernet drivers to look at. I
> thought maybe I could look at the DT, but I've no idea where
> "arm/bcm2837-rpi-3-b-plus.dts" is located, included by
> arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts.
Sorry about being so terse. I thought, the RPi devices are well known. My bad.
Anyway, the kernel reports that is the lan78xx driver.
ls -1 /sys/class/net/ | grep -v lo | xargs -n1 -I{} bash -c 'echo -n {} :" " ; basename `readlink -f /sys/class/net/{}/device/driver`'
eth0 : lan78xx
> The oops is because the PHY state machine has been started, but there
> is no phydev->adjust_link set. Can't say much more than that without
> knowing what the driver is doing.
This was a good tip! After a few printks I figured out what is happening.
phy_connect_direct()
phy_attach_direct()
workqueue
phy_check_link_status()
phy_link_change
Moving the phy_prepare_link() up in phy_connect_direct() ensures that
phydev->adjust_link is set when the phy_check_link_status() is called.
diff --git a/drivers/net/phy/phy_device.c
b/drivers/net/phy/phy_device.c index 9d2bbb13293e..2a61812bcb0d 100644
--- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c
@@ -951,11 +951,12 @@ int phy_connect_direct(struct net_device *dev,
struct phy_device *phydev, if (!dev) return -EINVAL;
+ phy_prepare_link(phydev, handler);
+
rc = phy_attach_direct(dev, phydev, phydev->dev_flags, interface);
if (rc)
return rc;
- phy_prepare_link(phydev, handler);
if (phy_interrupt_is_valid(phydev))
phy_request_interrupt(phydev);
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-10-14 19:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 14:06 lan78xx and phy_state_machine Daniel Wagner
2019-10-14 14:32 ` Daniel Wagner
2019-10-14 18:15 ` Stefan Wahren
2019-10-14 19:28 ` Daniel Wagner
2019-10-14 16:30 ` Russell King - ARM Linux admin
2019-10-14 19:25 ` Daniel Wagner [this message]
2019-10-14 19:51 ` Stefan Wahren
2019-10-14 20:20 ` Heiner Kallweit
2019-10-14 22:12 ` Russell King - ARM Linux admin
2019-10-15 19:38 ` Heiner Kallweit
2019-10-15 22:09 ` Russell King - ARM Linux admin
2019-10-16 15:36 ` Andrew Lunn
2019-10-16 5:48 ` Stefan Wahren
2019-10-15 0:14 ` Andrew Lunn
2019-10-14 23:53 ` Andrew Lunn
2019-10-15 0:53 ` Andrew Lunn
2019-10-15 17:16 ` Daniel Wagner
2019-10-16 14:25 ` Daniel Wagner
2019-10-16 15:51 ` Andrew Lunn
2019-10-17 6:52 ` Daniel Wagner
2019-10-17 13:15 ` Andrew Lunn
2019-10-17 17:05 ` Stefan Wahren
2019-10-17 17:41 ` Daniel Wagner
2019-10-17 17:52 ` Stefan Wahren
2019-10-17 18:14 ` Daniel Wagner
2019-10-17 18:25 ` Andrew Lunn
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=20191014192529.z7c5x6hzixxeplvw@beryllium.lan \
--to=dwagner@suse$(echo .)de \
--cc=bcm-kernel-feedback-list@broadcom$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-rpi-kernel@lists$(echo .)infradead.org \
--cc=linux@armlinux$(echo .)org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox