netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net v1 1/1] net: dsa: microchip: KSZ9893: do not write to not supported Output Clock Control Register
Date: Thu, 28 Jul 2022 15:34:11 +0200	[thread overview]
Message-ID: <YuKQU1tqn9jWwtTb@lunn.ch> (raw)
In-Reply-To: <20220728131852.41518-1-o.rempel@pengutronix.de>

On Thu, Jul 28, 2022 at 03:18:52PM +0200, Oleksij Rempel wrote:
> KSZ9893 compatible chips do not have "Output Clock Control Register 0x0103".
> So, avoid writing to it.
> 
> Fixes: 462d525018f0 ("net: dsa: microchip: move ksz_chip_data to ksz_common")
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/net/dsa/microchip/ksz9477.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
> index 5dff6c3279bb..c73bb6d383ad 100644
> --- a/drivers/net/dsa/microchip/ksz9477.c
> +++ b/drivers/net/dsa/microchip/ksz9477.c
> @@ -198,6 +198,10 @@ int ksz9477_reset_switch(struct ksz_device *dev)
>  	ksz_write32(dev, REG_SW_PORT_INT_MASK__4, 0x7F);
>  	ksz_read32(dev, REG_SW_PORT_INT_STATUS__4, &data32);
>  
> +	/* KSZ9893 compatible chips do not support refclk configuration */
> +	if (dev->chip_id == KSZ9893_CHIP_ID)
> +		return 0;
> +

Do you actually want to return -EINVAL? I assume this is being driven
by a DT property? And that property is not valid for this chip. So we
want to let the DT writer know. Question is, is there a backwards
compatibility issue? If this has always been silently ignored, and
there are DT with this property, do we want to break them.

      Andrew

  reply	other threads:[~2022-07-28 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 13:18 [PATCH net v1 1/1] net: dsa: microchip: KSZ9893: do not write to not supported Output Clock Control Register Oleksij Rempel
2022-07-28 13:34 ` Andrew Lunn [this message]
2022-07-29  5:23 ` Jakub Kicinski
2022-07-29  9:48   ` Oleksij Rempel
2022-07-29 15:41     ` Jakub Kicinski
2022-07-29 16:32       ` Oleksij Rempel

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=YuKQU1tqn9jWwtTb@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=vivien.didelot@gmail.com \
    --cc=woojung.huh@microchip.com \
    /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).