From: Andrew Lunn <andrew@lunn.ch>
To: Frank Sae <Frank.Sae@motor-comm.com>
Cc: hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
yuanlai.cui@motor-comm.com, hua.sun@motor-comm.com,
xiaoyong.li@motor-comm.com, suting.hu@motor-comm.com,
jie.han@motor-comm.com
Subject: Re: [PATCH net-next v2 2/2] net: phy: Add driver for Motorcomm yt8821 2.5G ethernet phy
Date: Sat, 17 Aug 2024 00:32:33 +0200 [thread overview]
Message-ID: <b9c42139-e9df-4ddd-865e-3d312236be00@lunn.ch> (raw)
In-Reply-To: <20240816060955.47076-3-Frank.Sae@motor-comm.com>
> +/**
> + * yt8821_get_features - read mmd register to get 2.5G capability
> + * @phydev: target phy_device struct
> + *
> + * Returns: 0 or negative errno code
> + */
> +static int yt8821_get_features(struct phy_device *phydev)
> +{
> + int val;
> +
> + val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PMA_NG_EXTABLE);
> + if (val < 0)
> + return val;
> +
> + linkmode_mod_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
> + phydev->supported,
> + val & MDIO_PMA_NG_EXTABLE_2_5GBT);
genphy_c45_pma_read_ext_abilities() ?
> +static int yt8821_read_status(struct phy_device *phydev)
> +{
> + int link;
> + int ret;
> + int val;
> +
> + if (phydev->autoneg == AUTONEG_ENABLE) {
> + int lpadv = phy_read_mmd(phydev,
> + MDIO_MMD_AN, MDIO_AN_10GBT_STAT);
> +
> + if (lpadv < 0)
> + return lpadv;
> +
> + mii_10gbt_stat_mod_linkmode_lpa_t(phydev->lp_advertising,
> + lpadv);
genphy_c45_read_lpa() ?
Andrew
next prev parent reply other threads:[~2024-08-16 22:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 6:09 [PATCH net-next v2 0/2] " Frank Sae
2024-08-16 6:09 ` [PATCH net-next v2 1/2] net: phy: Optimize phy speed mask to be compatible to yt8821 Frank Sae
2024-08-16 22:20 ` Andrew Lunn
2024-08-16 6:09 ` [PATCH net-next v2 2/2] net: phy: Add driver for Motorcomm yt8821 2.5G ethernet phy Frank Sae
2024-08-16 22:32 ` Andrew Lunn [this message]
2024-08-17 11:36 ` Russell King (Oracle)
2024-08-17 15:38 ` Andrew Lunn
2024-08-18 6:36 ` Frank.Sae
2024-08-17 12:38 ` [PATCH net-next v2 0/2] " Markus Elfring
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=b9c42139-e9df-4ddd-865e-3d312236be00@lunn.ch \
--to=andrew@lunn.ch \
--cc=Frank.Sae@motor-comm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=hua.sun@motor-comm.com \
--cc=jie.han@motor-comm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=suting.hu@motor-comm.com \
--cc=xiaoyong.li@motor-comm.com \
--cc=yuanlai.cui@motor-comm.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
all inboxes | Powered by JetHome®