From: Guenter Roeck <linux@roeck-us.net>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Serge Semin <Sergey.Semin@t-platforms.ru>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] net: phy: realtek: Add rtl8211e rx/tx delays config
Date: Sun, 12 May 2019 22:41:32 -0700 [thread overview]
Message-ID: <20190513054132.GA7563@roeck-us.net> (raw)
In-Reply-To: <20190426212112.5624-1-fancer.lancer@gmail.com>
Hi,
On Sat, Apr 27, 2019 at 12:21:11AM +0300, Serge Semin wrote:
> There are two chip pins named TXDLY and RXDLY which actually adds the 2ns
> delays to TXC and RXC for TXD/RXD latching. Alas this is the only
> documented info regarding the RGMII timing control configurations the PHY
> provides. It turns out the same settings can be setup via MDIO registers
> hidden in the extension pages layout. Particularly the extension page 0xa4
> provides a register 0x1c, which bits 1 and 2 control the described delays.
> They are used to implement the "rgmii-{id,rxid,txid}" phy-mode.
>
> The hidden RGMII configs register utilization was found in the rtl8211e
> U-boot driver:
> https://elixir.bootlin.com/u-boot/v2019.01/source/drivers/net/phy/realtek.c#L99
>
> There is also a freebsd-folks discussion regarding this register:
> https://reviews.freebsd.org/D13591
>
> It confirms that the register bits field must control the so called
> configuration pins described in the table 12-13 of the official PHY
> datasheet:
> 8:6 = PHY Address
> 5:4 = Auto-Negotiation
> 3 = Interface Mode Select
> 2 = RX Delay
> 1 = TX Delay
> 0 = SELRGV
>
> Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
This patch results in a crash when running arm:ast2500-evb in qemu.
[ 4.894572] [00000000] *pgd=00000000
[ 4.895329] Internal error: Oops: 80000005 [#1] ARM
[ 4.896066] CPU: 0 PID: 1 Comm: swapper Not tainted 5.1.0-09698-g1fb3b52 #1
[ 4.896364] Hardware name: Generic DT based system
[ 4.896823] PC is at 0x0
[ 4.897037] LR is at phy_select_page+0x3c/0x7c
Debugging shows that phydev->drv->write_page and phydev->drv->read_page
are NULL, so the crash isn't entirely surprising.
What I don't understand is how this can work in the first place.
The modified entry in realtek_drvs[] doesn't have read_page/write_page
functions defined, yet rtl8211e_config_init() depends on it.
What am I missing here ?
Thanks,
Guenter
next prev parent reply other threads:[~2019-05-13 5:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 9:30 [PATCH] net: phy: realtek: Add rtl8211e rx/tx delays config Serge Semin
2019-04-26 13:28 ` Andrew Lunn
2019-04-26 19:19 ` Serge Semin
2019-04-26 20:05 ` Andrew Lunn
2019-04-26 20:28 ` Serge Semin
2019-04-26 17:17 ` Heiner Kallweit
2019-04-26 20:26 ` Serge Semin
2019-04-26 21:21 ` [PATCH v2 1/2] " Serge Semin
2019-04-26 21:40 ` Andrew Lunn
2019-04-26 23:45 ` Serge Semin
2019-04-27 3:11 ` Florian Fainelli
2019-04-27 7:44 ` Serge Semin
2019-04-27 15:21 ` Andrew Lunn
2019-04-28 19:19 ` Serge Semin
2019-04-27 19:20 ` Florian Fainelli
2019-05-08 1:29 ` [PATCH v3 0/2] net: phy: realtek: Fix RGMII TX/RX-delays initial config of rtl8211(e|f) Serge Semin
2019-05-08 1:29 ` [PATCH v3 1/2] net: phy: realtek: Add rtl8211e rx/tx delays config Serge Semin
2019-05-08 1:29 ` [PATCH v3 2/2] net: phy: realtek: Change TX-delay setting for RGMII modes only Serge Semin
2019-05-08 16:37 ` [PATCH v3 0/2] net: phy: realtek: Fix RGMII TX/RX-delays initial config of rtl8211(e|f) David Miller
2019-05-08 21:51 ` [PATCH v4 " Serge Semin
2019-05-08 21:51 ` [PATCH v4 1/2] net: phy: realtek: Add rtl8211e rx/tx delays config Serge Semin
2019-05-08 21:51 ` [PATCH v4 2/2] net: phy: realtek: Change TX-delay setting for RGMII modes only Serge Semin
2019-05-08 23:31 ` [PATCH v4 0/2] net: phy: realtek: Fix RGMII TX/RX-delays initial config of rtl8211(e|f) David Miller
2019-05-13 5:41 ` Guenter Roeck [this message]
2019-05-13 10:37 ` [PATCH v2 1/2] net: phy: realtek: Add rtl8211e rx/tx delays config Serge Semin
2019-04-26 21:21 ` [PATCH v2 2/2] net: phy: realtek: Change TX-delay setting for RGMII modes only Serge Semin
2019-04-26 21:46 ` Andrew Lunn
2019-04-26 23:35 ` Serge Semin
2019-04-29 17:37 ` Florian Fainelli
2019-04-29 18:29 ` Vladimir Oltean
2019-04-29 21:12 ` Serge Semin
2019-04-29 22:36 ` Vladimir Oltean
2019-04-30 12:54 ` Serge Semin
2019-04-30 20:44 ` Martin Blumenstingl
2019-05-08 0:48 ` Serge Semin
2019-04-30 21:16 ` Martin Blumenstingl
2019-05-01 23:03 ` Vladimir Oltean
2019-05-03 17:29 ` Martin Blumenstingl
2019-05-06 14:39 ` Serge Semin
2019-05-06 17:21 ` Martin Blumenstingl
2019-05-07 17:37 ` Heiner Kallweit
2019-05-07 20:09 ` Martin Blumenstingl
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=20190513054132.GA7563@roeck-us.net \
--to=linux@roeck-us.net \
--cc=Sergey.Semin@t-platforms.ru \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--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 \
/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;
as well as URLs for NNTP newsgroup(s).