From: Andrew Lunn <andrew@lunn•ch>
To: Enguerrand de Ribaucourt
<enguerrand.de-ribaucourt@savoirfairelinux•com>
Cc: netdev@vger•kernel.org, hkallweit1@gmail•com, linux@armlinux•org.uk
Subject: Re: [PATCH 1/2] net: phy: micrel: add Microchip KSZ 9897 Switch PHY support
Date: Fri, 4 Feb 2022 15:05:05 +0100 [thread overview]
Message-ID: <Yf0ykctMgWKswgpC@lunn.ch> (raw)
In-Reply-To: <20220204133635.296974-2-enguerrand.de-ribaucourt@savoirfairelinux.com>
On Fri, Feb 04, 2022 at 02:36:34PM +0100, Enguerrand de Ribaucourt wrote:
> Adding Microchip 9897 Phy included in KSZ9897 Switch.
> The KSZ9897 shares the same prefix as the KSZ8081. The phy_id_mask was
> updated to allow the KSZ9897 to be matched.
>
> Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux•com>
> ---
> drivers/net/phy/micrel.c | 15 +++++++++++++--
> include/linux/micrel_phy.h | 1 +
> 2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 44a24b99c894..9b2047e26449 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -1726,7 +1726,7 @@ static struct phy_driver ksphy_driver[] = {
> }, {
> .phy_id = PHY_ID_KSZ8081,
> .name = "Micrel KSZ8081 or KSZ8091",
> - .phy_id_mask = MICREL_PHY_ID_MASK,
> + .phy_id_mask = 0x00ffffff,
You can probably use PHY_ID_MATCH_EXACT().
> .flags = PHY_POLL_CABLE_TEST,
> /* PHY_BASIC_FEATURES */
> .driver_data = &ksz8081_type,
> @@ -1869,6 +1869,16 @@ static struct phy_driver ksphy_driver[] = {
> .config_init = kszphy_config_init,
> .suspend = genphy_suspend,
> .resume = genphy_resume,
> +}, {
> + .phy_id = PHY_ID_KSZ9897,
> + .phy_id_mask = 0x00ffffff,
Here as well.
> + .name = "Microchip KSZ9897",
> + /* PHY_BASIC_FEATURES */
> + .config_init = kszphy_config_init,
> + .config_aneg = ksz8873mll_config_aneg,
> + .read_status = ksz8873mll_read_status,
> + .suspend = genphy_suspend,
> + .resume = genphy_resume,
> } };
>
> module_phy_driver(ksphy_driver);
> @@ -1888,11 +1898,12 @@ static struct mdio_device_id __maybe_unused micrel_tbl[] = {
> { PHY_ID_KSZ8041, MICREL_PHY_ID_MASK },
> { PHY_ID_KSZ8051, MICREL_PHY_ID_MASK },
> { PHY_ID_KSZ8061, MICREL_PHY_ID_MASK },
> - { PHY_ID_KSZ8081, MICREL_PHY_ID_MASK },
> + { PHY_ID_KSZ8081, 0x00ffffff },
And here.
> { PHY_ID_KSZ8873MLL, MICREL_PHY_ID_MASK },
> { PHY_ID_KSZ886X, MICREL_PHY_ID_MASK },
> { PHY_ID_LAN8814, MICREL_PHY_ID_MASK },
> { PHY_ID_LAN8804, MICREL_PHY_ID_MASK },
> + { PHY_ID_KSZ9897, 0x00ffffff },
etc.
Andrew
next prev parent reply other threads:[~2022-02-04 14:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 13:36 [PATCH 0/2] net: phy: micrel: add Microchip KSZ 9897 Switch PHY support Enguerrand de Ribaucourt
2022-02-04 13:36 ` [PATCH 1/2] " Enguerrand de Ribaucourt
2022-02-04 14:05 ` Andrew Lunn [this message]
2022-02-04 15:17 ` Enguerrand de Ribaucourt
2022-02-04 17:04 ` Andrew Lunn
2022-02-04 13:36 ` [PATCH 2/2] net: phy: micrel: add Microchip KSZ 9477 to the device table Enguerrand de Ribaucourt
2022-02-04 14:06 ` Andrew Lunn
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=Yf0ykctMgWKswgpC@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=enguerrand.de-ribaucourt@savoirfairelinux$(echo .)com \
--cc=hkallweit1@gmail$(echo .)com \
--cc=linux@armlinux$(echo .)org.uk \
--cc=netdev@vger$(echo .)kernel.org \
/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