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: <VI1PR0401MB22711000D5299C323189FD0BFFB20@VI1PR0401MB2271.eurprd04.prod.outlook.com>
Date:   Mon, 31 Jul 2017 01:42:48 +0000
From:   Andy Duan <fugang.duan@....com>
To:     Andrew Lunn <andrew@...n.ch>, David Miller <davem@...emloft.net>
CC:     netdev <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next] net: fec: Issue error for missing but expected
 PHY

From: Andrew Lunn <andrew@...n.ch> Sent: Monday, July 31, 2017 4:11 AM
>If the PHY is missing but expected, e.g. because of a typ0 in the dt file, it is not
>possible to open the interface. ip link returns:
>
>RTNETLINK answers: No such device
>
>It is not very obvious what the problem is. Add a netdev_err() in this case to
>make it easier to debug the issue.
>
>[   21.409385] fec 2188000.ethernet eth0: Unable to connect to phy
>RTNETLINK answers: No such device
>
>Signed-off-by: Andrew Lunn <andrew@...n.ch>

Acked-by: Fugang Duan <fugang.duan@....com>

>---
> drivers/net/ethernet/freescale/fec_main.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/ethernet/freescale/fec_main.c
>b/drivers/net/ethernet/freescale/fec_main.c
>index cc0c2a58c4de..c5995f07f821 100644
>--- a/drivers/net/ethernet/freescale/fec_main.c
>+++ b/drivers/net/ethernet/freescale/fec_main.c
>@@ -1907,8 +1907,10 @@ static int fec_enet_mii_probe(struct net_device
>*ndev)
> 		phy_dev = of_phy_connect(ndev, fep->phy_node,
> 					 &fec_enet_adjust_link, 0,
> 					 fep->phy_interface);
>-		if (!phy_dev)
>+		if (!phy_dev) {
>+			netdev_err(ndev, "Unable to connect to phy\n");
> 			return -ENODEV;
>+		}
> 	} else {
> 		/* check for attached phy */
> 		for (phy_id = 0; (phy_id < PHY_MAX_ADDR); phy_id++) {
>--
>2.13.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ