public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn•ch>
To: Simon Horman <horms@verge•net.au>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>,
	David Miller <davem@davemloft•net>,
	Magnus Damm <magnus.damm@gmail•com>,
	netdev@vger•kernel.org, linux-renesas-soc@vger•kernel.org,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas•com>,
	Wolfram Sang <wsa+renesas@sang-engineering•com>
Subject: Re: [PATCH v2 net-next] ravb: Avoid unsupported internal delay mode for R-Car E3/D3
Date: Thu, 11 Apr 2019 15:33:57 +0200	[thread overview]
Message-ID: <20190411133357.GE8916@lunn.ch> (raw)
In-Reply-To: <20190411092056.jmnsx6mnfylfrsh4@verge.net.au>

On Thu, Apr 11, 2019 at 11:20:57AM +0200, Simon Horman wrote:
> On Thu, Apr 11, 2019 at 10:40:27AM +0200, Simon Horman wrote:
> > On Wed, Apr 10, 2019 at 08:17:16PM +0300, Sergei Shtylyov wrote:
> > > On 04/10/2019 07:19 PM, Andrew Lunn wrote:
> > > 
> > > >> According to the R-Car Gen3 Hardware Manual Rev 1.50 of Nov 30, 2018, the
> > > >> TX clock internal delay mode isn't supported on R-Car E3 (r8a77990) or D3
> > > >> (r8a77995). And by extension it is also not supported by RZ/G2E (r9a774c0).
> > > >>
> > > >> This matches all ES versions of the affected SoCs as it is
> > > >> not clear if this problem will be resolved in newer chips.
> > > >> This can be revisited, as necessary.
> > > >>
> > > >> This patch does not error-out if PHY_INTERFACE_MODE_RGMII_ID or
> > > >> PHY_INTERFACE_MODE_RGMII_TXID are used on SoCs where TX clock delay
> > > >> mode is not supported as there is a risk of introducing a regression
> > > >> when used in conjunction with older DT blobs present in the field.
> > > > 
> > > > Hi Simon
> > > > 
> > > > I think it should at least WARN_ON(). Such blobs are broken, even if
> > > > they do kind of work.
> > > 
> > >    Good idea! Simon, third time's a charm? :-)
> > 
> > Sure, can do.
> 
> How about something like this?
> 
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -1980,8 +1987,14 @@ static void ravb_set_delay_mode(struct net_device *ndev)
>  		set |= APSR_DM_RDM;
>  
>  	if (priv->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
> -	    priv->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID)
> -		set |= APSR_DM_TDM;
> +	    priv->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) {
> +		if (soc_device_match(ravb_delay_mode_quirk_match))
> +			dev_warn(ndev->dev.parent,
> +				 "phy-mode %s requires TX clock internal delay mode which is not supported by this hardwre revision",
> +				 phy_modes(priv->phy_interface));

Hi Simon

The point of the warning is to tell users they should upgrade their DT
blob to one that is not broken. So i think the message should say
this. Also, we want users to notice this, which is why i said
WARN_ON(). Something big so it gets noticed.

	   Andrew

  reply	other threads:[~2019-04-11 13:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 11:45 [PATCH v2 net-next] ravb: Avoid unsupported internal delay mode for R-Car E3/D3 Simon Horman
2019-04-10 12:17 ` Wolfram Sang
2019-04-10 16:19 ` Andrew Lunn
2019-04-10 17:17   ` Sergei Shtylyov
2019-04-11  8:40     ` Simon Horman
2019-04-11  9:20       ` Simon Horman
2019-04-11 13:33         ` Andrew Lunn [this message]
2019-04-11 16:36           ` Sergei Shtylyov
2019-04-15 11:45             ` Simon Horman
2019-04-15 16:49               ` Andrew Lunn
2019-04-15 17:10               ` Sergei Shtylyov

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=20190411133357.GE8916@lunn.ch \
    --to=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=horms@verge$(echo .)net.au \
    --cc=linux-renesas-soc@vger$(echo .)kernel.org \
    --cc=magnus.damm@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sergei.shtylyov@cogentembedded$(echo .)com \
    --cc=wsa+renesas@sang-engineering$(echo .)com \
    --cc=yoshihiro.shimoda.uh@renesas$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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