All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, hkallweit1@gmail.com,
	linux@armlinux.org.uk, woojung.huh@microchip.com,
	UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net v4 1/5] net: phy: micrel: add Microchip KSZ 9897 Switch PHY support
Date: Sat, 1 Jun 2024 18:13:40 +0100	[thread overview]
Message-ID: <20240601171340.GU491852@kernel.org> (raw)
In-Reply-To: <20240531142430.678198-2-enguerrand.de-ribaucourt@savoirfairelinux.com>

On Fri, May 31, 2024 at 02:24:26PM +0000, Enguerrand de Ribaucourt wrote:
> There is a DSA driver for microchip,ksz9897 which can be controlled
> through SPI or I2C. This patch adds support for it's CPU ports PHYs to
> also allow network access to the switch's CPU port.
> 
> The CPU ports PHYs of the KSZ9897 are not documented in the datasheet.
> They weirdly use the same PHY ID as the KSZ8081, which is a different
> PHY and that driver isn't compatible with KSZ9897. Before this patch,
> the KSZ8081 driver was used for the CPU ports of the KSZ9897 but the
> link would never come up.
> 
> A new driver for the KSZ9897 is added, based on the compatible KSZ87XX.
> I could not test if Gigabit Ethernet works, but the link comes up and
> can successfully allow packets to be sent and received with DSA tags.
> 
> To resolve the KSZ8081/KSZ9897 phy_id conflicts, I could not find any
> stable register to distinguish them. Instead of a match_phy_device() ,
> I've declared a virtual phy_id with the highest value in Microchip's OUI
> range.
> 
> Example usage in the device tree:
> 	compatible = "ethernet-phy-id0022.17ff";
> 
> A discussion to find better alternatives had been opened with the
> Microchip team, with no response yet.
> 
> See https://lore.kernel.org/all/20220207174532.362781-1-enguerrand.de-ribaucourt@savoirfairelinux.com/
> 
> Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477")
> Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>

...

> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c

...

> @@ -5495,6 +5495,17 @@ static struct phy_driver ksphy_driver[] = {
>  	.suspend	= genphy_suspend,
>  	.resume		= genphy_resume,
>  	.get_features	= ksz9477_get_features,
> +}, {
> +	.phy_id		= PHY_ID_KSZ9897,
> +	.phy_id_mask	= MICREL_PHY_ID_MASK,
> +	.name		= "Microchip KSZ9897 Switch",
> +	/* PHY_BASIC_FEATURES */
> +	.config_init	= kszphy_config_init,
> +	.config_aneg	= ksz8873mll_config_aneg,
> +	.read_status	= ksz8873mll_read_status,
> +	/* No suspend/resume callbacks because of errata DS00002330D:
> +	 * Toggling PHY Powerdown can cause errors or link failures in adjacent PHYs
> +	 */

It looks like there will be another version of this patchset.
If so, please line-wrap the comment above so it is 80 columns wide or less,
as is preferred for Networking code.

Likewise in the following patch.

Flagged by checkpatch.pl --max-line-length=80

>  } };
>  
>  module_phy_driver(ksphy_driver);

...

  parent reply	other threads:[~2024-06-01 17:13 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 10:24 [PATCH v3 0/5] Add Microchip KSZ 9897 Switch CPU PHY + Errata Enguerrand de Ribaucourt
2024-05-30 10:24 ` [PATCH v3 1/5] net: phy: micrel: add Microchip KSZ 9897 Switch PHY support Enguerrand de Ribaucourt
2024-05-30 13:26   ` Andrew Lunn
2024-05-30 10:24 ` [PATCH v3 2/5] net: phy: micrel: disable suspend/resume callbacks following errata Enguerrand de Ribaucourt
2024-05-30 10:24 ` [PATCH v3 3/5] net: phy: micrel: add Microchip KSZ 9477 to the device table Enguerrand de Ribaucourt
2024-05-30 10:24 ` [PATCH v3 4/5] net: dsa: microchip: use collision based back pressure mode Enguerrand de Ribaucourt
2024-05-30 10:24 ` [PATCH v3 5/5] net: dsa: microchip: monitor potential faults in half-duplex mode Enguerrand de Ribaucourt
2024-05-30 10:37   ` Hariprasad Kelam
2024-05-30 13:29     ` Andrew Lunn
2024-05-30 13:30 ` [PATCH v3 0/5] Add Microchip KSZ 9897 Switch CPU PHY + Errata Andrew Lunn
2024-05-30 18:46 ` Woojung.Huh
2024-05-31 14:24 ` [PATCH v4 " Enguerrand de Ribaucourt
2024-05-31 14:24   ` [PATCH net v4 1/5] net: phy: micrel: add Microchip KSZ 9897 Switch PHY support Enguerrand de Ribaucourt
2024-05-31 19:39     ` Tristram.Ha
2024-06-03  7:53       ` Enguerrand de Ribaucourt
2024-06-01 17:13     ` Simon Horman [this message]
2024-05-31 14:24   ` [PATCH net v4 2/5] net: phy: micrel: disable suspend/resume callbacks following errata Enguerrand de Ribaucourt
2024-05-31 19:22     ` Tristram.Ha
2024-05-31 14:24   ` [PATCH net v4 3/5] net: phy: micrel: add Microchip KSZ 9477 to the device table Enguerrand de Ribaucourt
2024-05-31 14:24   ` [PATCH net v4 4/5] net: dsa: microchip: use collision based back pressure mode Enguerrand de Ribaucourt
2024-06-03  3:23     ` Arun.Ramadoss
2024-05-31 14:24   ` [PATCH net v4 5/5] net: dsa: microchip: monitor potential faults in half-duplex mode Enguerrand de Ribaucourt
2024-05-31 15:14     ` Arun.Ramadoss
2024-06-01 17:08     ` Simon Horman
2024-06-04  9:23 ` [PATCH net v5 0/5] Add Microchip KSZ 9897 Switch CPU PHY + Errata Enguerrand de Ribaucourt
2024-06-04 14:51   ` Jakub Kicinski
2024-06-04 15:09   ` Woojung.Huh
2024-06-04  9:23 ` [PATCH net v5 1/4] net: phy: micrel: add Microchip KSZ 9897 Switch PHY support Enguerrand de Ribaucourt
2024-06-04 20:49   ` Woojung.Huh
2024-06-05  8:33     ` Enguerrand de Ribaucourt
2024-06-05 13:37       ` Woojung.Huh
2024-06-06 22:57       ` Woojung.Huh
2024-06-07  8:11         ` Enguerrand de Ribaucourt
2024-06-07  8:32           ` Enguerrand de Ribaucourt
2024-06-07 13:41             ` Woojung.Huh
2024-06-04  9:23 ` [PATCH net v5 2/4] net: phy: micrel: add Microchip KSZ 9477 to the device table Enguerrand de Ribaucourt
2024-06-04  9:23 ` [PATCH net v5 3/4] net: dsa: microchip: use collision based back pressure mode Enguerrand de Ribaucourt
2024-06-04 20:50   ` Woojung.Huh
2024-06-05  3:18   ` Arun.Ramadoss
2024-06-04  9:23 ` [PATCH net v5 4/4] net: dsa: microchip: monitor potential faults in half-duplex mode Enguerrand de Ribaucourt
2024-06-04 16:48   ` Woojung.Huh
2024-06-05  3:31   ` Arun.Ramadoss
2024-06-05  7:53     ` Enguerrand de Ribaucourt
2024-06-06  2:34       ` Arun.Ramadoss

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=20240601171340.GU491852@kernel.org \
    --to=horms@kernel.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=enguerrand.de-ribaucourt@savoirfairelinux.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.