devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
To: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Cc: Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	Florian Fainelli
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Corentin Labbe
	<clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v2 3/4] net: phy: realtek: add disable RX internal delay mode
Date: Tue, 22 Aug 2017 15:39:06 +0200	[thread overview]
Message-ID: <20170822133906.GG24555@lunn.ch> (raw)
In-Reply-To: <20170822040400.12166-4-icenowy-h8G6r0blFSE@public.gmane.org>

On Tue, Aug 22, 2017 at 12:03:59PM +0800, Icenowy Zheng wrote:
> From: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
> 
> Some RTL8211E chips have broken GbE function, which needs a hack to
> fix. It's said that this fix will affect the performance on not-buggy
> PHYs, so it should only be enabled on boards with the broken PHY.

I would not call this a broken PHY. It is a question of board
design. If you have shorter tracks, you need a delay. If you have long
tracks, you don't. Hence the four RGMII modes, so you can select if
the delay is needed or not, depending on your board design.

> Currently only some Pine64+ boards are known to have this issue.

Design feature.

Please remove all reference to bug.
 
> This hack is said to disable RX relay for RTL8211E according to Realtek.
> So implement it as RGMII-TXID mode.

Do we know that the TX lines do have a delay after making this change?
We need to be careful here. We will get into a mess if this is
actually RGMII not RGMII_TXID, and somebody designs a board which
needs RGMII-TXID.

> +#include <linux/of.h>
>  #include <linux/phy.h>
>  #include <linux/module.h>

> +static int rtl8211e_config_init(struct phy_device *phydev)
> +{
> +	struct device *dev = &phydev->mdio.dev;
> +	struct device_node *of_node = dev->of_node;

You don't appear to use of_node, nor dev. Please remove, along with
the header file.

    Andrew

  parent reply	other threads:[~2017-08-22 13:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22  4:03 [PATCH v2 0/4] Workaround broken RTL8211E on some Pine64+ boards Icenowy Zheng
     [not found] ` <20170822040400.12166-1-icenowy-h8G6r0blFSE@public.gmane.org>
2017-08-22  4:03   ` [PATCH v2 1/4] net: stmmac: dwmac-sun8i: support RGMII modes with PHY internal delay Icenowy Zheng
2017-08-22  4:03   ` [PATCH v2 2/4] net: phy: realtek: change macro name for page select register Icenowy Zheng
2017-08-22  4:03   ` [PATCH v2 3/4] net: phy: realtek: add disable RX internal delay mode Icenowy Zheng
     [not found]     ` <20170822040400.12166-4-icenowy-h8G6r0blFSE@public.gmane.org>
2017-08-22 13:39       ` Andrew Lunn [this message]
     [not found]         ` <20170822133906.GG24555-g2DYL2Zd6BY@public.gmane.org>
2017-08-24  8:05           ` icenowy-h8G6r0blFSE
     [not found]             ` <7c43220aef447e5cf21e48a9eca18535-h8G6r0blFSE@public.gmane.org>
2017-08-24 13:12               ` Andrew Lunn
2017-08-24  2:35       ` kbuild test robot
2017-08-22  4:04   ` [PATCH v2 4/4] arm64: allwinner: a64: disable the RTL8211E internal RX delay on Pine64+ Icenowy Zheng

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=20170822133906.GG24555@lunn.ch \
    --to=andrew-g2dyl2zd6by@public.gmane.org \
    --cc=clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=icenowy-h8G6r0blFSE@public.gmane.org \
    --cc=icenowy-ymACFijhrKM@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@public.gmane.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).