lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201105162035.GN933237@lunn.ch>
Date:   Thu, 5 Nov 2020 17:20:35 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Alayev Michael <malayev@....co.il>
Cc:     "mic.al.linux@...il.com" <mic.al.linux@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: net: dsa: mv88e6xxx : linux v5.4 crash

> &gem0 {
> 	status = "okay";
> 	phy-mode = "rgmii-id";
> 	phy-handle = <&phy0>;	
> 	fixed-link {
> 		speed = <1000>;
> 		full-duplex;
> 	};
> 
> > The diagram you showed had gem0 connected directly to the switch. So
> > this phy-handle is wrong. Or the diagram is wrong.
> The diagram is correct. I have commented the phy-mode and phy-handle in 'gem0' definition and got error:
> 'macb e000b000.ethernet eth0: no PHY found'

/* based on au1000_eth. c*/
static int macb_mii_probe(struct net_device *dev)
{
        struct macb *bp = netdev_priv(dev);
        struct phy_device *phydev;
        struct device_node *np;
        int ret, i;

        np = bp->pdev->dev.of_node;
        ret = 0;

        if (np) {
                if (of_phy_is_fixed_link(np)) {
                        bp->phy_node = of_node_get(np);
                } else {
...
        if (bp->phy_node) {
                phydev = of_phy_connect(dev, bp->phy_node,
                                        &macb_handle_link_change, 0,
                                        bp->phy_interface);
                if (!phydev)
                        return -ENODEV;
        } else {
                phydev = phy_find_first(bp->mii_bus);
                if (!phydev) {
                        netdev_err(dev, "no PHY found\n");
                        return -ENXIO;
                }


So either of_phy_is_fixed_link(np) is returning false, or
of_node_get(np) returns NULL.

You need to do some debugging and figure out which and why.

Also, note that this code has changed a lot since v5.4. You might want
to try v5.9, or v5.10-rc2.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ