From: Jakub Kicinski <kuba@kernel.org>
To: Frank <Frank.Sae@motor-comm.com>
Cc: Peter Geis <pgwipeout@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
yinghong.zhang@motor-comm.com, fei.zhang@motor-comm.com,
hua.sun@motor-comm.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4.4] net: phy: Add driver for Motorcomm yt8521 gigabit ethernet phy
Date: Mon, 22 Aug 2022 20:21:47 -0700 [thread overview]
Message-ID: <20220822202147.4be904de@kernel.org> (raw)
In-Reply-To: <20220817112554.383-1-Frank.Sae@motor-comm.com>
On Wed, 17 Aug 2022 19:25:54 +0800 Frank wrote:
> +static int yt8521_fiber_config_aneg(struct phy_device *phydev)
> +{
> + int err, changed;
> + u16 adv;
> +
> + if (phydev->autoneg != AUTONEG_ENABLE)
> + return yt8521_fiber_setup_forced(phydev);
> +
> + err = ytphy_modify_ext_with_lock(phydev, YTPHY_MISC_CONFIG_REG,
> + YTPHY_MCR_FIBER_SPEED_MASK,
> + YTPHY_MCR_FIBER_1000BX);
> + if (err < 0)
> + return err;
> +
> + /* enable Fiber auto sensing */
> + err = ytphy_modify_ext_with_lock(phydev, YT8521_LINK_TIMER_CFG2_REG,
> + 0, YT8521_LTCR_EN_AUTOSEN);
> + if (err < 0)
> + return err;
> +
> + /* Setup fiber advertisement */
> + adv = ADVERTISE_1000XFULL | ADVERTISE_1000XPAUSE |
> + ADVERTISE_1000XPSE_ASYM;
Is it okay to ignore phydev->advertising and always set the same mask?
> + err = phy_modify_changed(phydev, MII_ADVERTISE,
> + ADVERTISE_1000XHALF | ADVERTISE_1000XFULL |
> + ADVERTISE_1000XPAUSE | ADVERTISE_1000XPSE_ASYM,
> + adv);
next prev parent reply other threads:[~2022-08-23 3:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 11:25 [PATCH v4.4] net: phy: Add driver for Motorcomm yt8521 gigabit ethernet phy Frank
2022-08-23 3:21 ` Jakub Kicinski [this message]
2022-08-23 14:14 ` Andrew Lunn
2022-08-23 18:37 ` Jakub Kicinski
2022-08-23 18:53 ` Andrew Lunn
2022-08-23 20:19 ` Russell King (Oracle)
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=20220822202147.4be904de@kernel.org \
--to=kuba@kernel.org \
--cc=Frank.Sae@motor-comm.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fei.zhang@motor-comm.com \
--cc=hkallweit1@gmail.com \
--cc=hua.sun@motor-comm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pgwipeout@gmail.com \
--cc=yinghong.zhang@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;
as well as URLs for NNTP newsgroup(s).