[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5AJRTfja47xGG6nzLdC7Bdr=r5K0FVCcgMvN05XSb7LhA@mail.gmail.com>
Date: Wed, 4 May 2022 07:48:56 -0300
From: Fabio Estevam <festevam@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Russell King - ARM Linux <linux@...linux.org.uk>,
Heiner Kallweit <hkallweit1@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
netdev <netdev@...r.kernel.org>,
NXP Linux Team <linux-imx@....com>
Subject: Re: imx6sx: Regression on FEC with KSZ8061
On Wed, May 4, 2022 at 7:24 AM Fabio Estevam <festevam@...il.com> wrote:
>
> Hi,
>
> On an imx6sx-based board, the Ethernet is functional on 5.10.
>
> The board has a KSZ8061 Ethernet PHY.
>
> After moving to kernel 5.15 or 5.17, the Ethernet is no longer functional:
>
> # udhcpc -i eth0
> udhcpc: started, v1.35.0
> 8<--- cut here ---
> Unable to handle kernel NULL pointer dereference at virtual address 00000008
> pgd = f73cef4e
> [00000008] *pgd=00000000
> Internal error: Oops: 5 [#1] SMP ARM
> Modules linked in:
> CPU: 0 PID: 196 Comm: ifconfig Not tainted 5.15.37-dirty #94
> Hardware name: Freescale i.MX6 SoloX (Device Tree)
> PC is at kszphy_config_reset+0x10/0x114
By adding this change, we can see that priv is NULL:
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -508,8 +508,12 @@ static int kszphy_nand_tree_disable(struct phy_device *phyd
ev)
/* Some config bits need to be set again on resume, handle them here. */
static int kszphy_config_reset(struct phy_device *phydev)
{
- struct kszphy_priv *priv = phydev->priv;
int ret;
+ struct kszphy_priv *priv = phydev->priv;
+ if (!priv) {
+ pr_err("*********** priv is NULL\n");
+ return -ENOMEM;
+ }
if (priv->rmii_ref_clk_sel) {
udhcpc: started, v1.35.0
[ 14.754823] *********** priv is NULL
[ 14.754863] Micrel KSZ8061 2188000.ethernet-1:00: attached PHY
driver (mii_bus:phy_addr=2188000.ethernet-1:00, irq=POLL)
[ 14.757024] *********** priv is NULL
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
Any ideas?
Thanks
Powered by blists - more mailing lists