mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vicente Bergas <vicencb@gmail.com>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: net: phy: realtek: regression, kernel null pointer dereference
Date: Mon, 13 May 2019 14:19:17 +0200	[thread overview]
Message-ID: <cf1e81d9-6f91-41fe-a390-b9688e5707f7@gmail.com> (raw)
In-Reply-To: <20190513105104.af7d7n337lxqac63@mobilestation>

On Monday, May 13, 2019 12:51:05 PM CEST, Serge Semin wrote:
> On Mon, May 13, 2019 at 01:29:42PM +0300, Serge Semin wrote:
>> Hello Vincente,
>> 
>> On Sat, May 11, 2019 at 05:06:04PM +0200, Vicente Bergas wrote: ...
>
> Hmm, just figured out, that in the datasheet RXDLY/TXDLY pins 
> are actually grounded, so
> phy-mode="rgmii" should work for you. Are you sure that on your 
> actual hardware the
> resistors aren't placed differently?

That is correct, the schematic has pull-down resistors and placeholders for
pull-up resistors. On the board I can confirm the pull-ups are not
populated and the pull-downs are.
But the issue seems unrelated to this.

I have traced it down to a deadlock while trying to acquire a mutex.
It hangs here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/phy/realtek.c?id=47782361aca2#n220
while waiting for this mutex:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/phy/mdio_bus.c?id=47782361aca2#n692

Regards,
  Vicenç.

> The current config register state can be read from the 0x1c 
> extension page. Something
> like this:
> --- a/drivers/net/phy/realtek.c
> +++ b/drivers/net/phy/realtek.c
> @@ -221,6 +221,9 @@ static int rtl8211e_config_init(struct 
> phy_device *phydev)
>  	if (ret)
>  		goto err_restore_page;
>  
> +	ret = phy_read(phydev, 0x1c);
> +	dev_info(&phydev->mdio.dev, "PHY config register %08x\n", ret);
> +
>  	ret = phy_modify(phydev, 0x1c, RTL8211E_TX_DELAY | RTL8211E_RX_DELAY,
>  			 val);
>  
> -Sergey


  reply	other threads:[~2019-05-13 12:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 15:05 Vicente Bergas
2019-05-10 20:28 ` Heiner Kallweit
2019-05-10 21:18   ` Vicente Bergas
2019-05-11 14:46   ` Vicente Bergas
2019-05-11 14:56     ` Heiner Kallweit
2019-05-11 15:06       ` Vicente Bergas
2019-05-13 10:29         ` Serge Semin
2019-05-13 10:51           ` Serge Semin
2019-05-13 12:19             ` Vicente Bergas [this message]
2019-05-13 12:42               ` Serge Semin
2019-05-13 12:51                 ` Andrew Lunn
2019-05-13 13:01                   ` Serge Semin
2019-05-13 13:33                     ` Vicente Bergas
2019-05-13  7:29       ` Serge Semin
2019-05-11 15:08     ` Andrew Lunn
2019-05-11 15:16       ` Vicente Bergas
2019-05-11 15:25         ` Andrew Lunn
2019-05-10 21:04 ` Russell King - ARM Linux admin

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=cf1e81d9-6f91-41fe-a390-b9688e5707f7@gmail.com \
    --to=vicencb@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=fancer.lancer@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

all inboxes | Powered by JetHome®