From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Sean Anderson <sean.anderson@seco.com>
Cc: Madalin Bucur <madalin.bucur@nxp.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Eric Dumazet <edumazet@google.com>,
Camelia Alexandra Groza <camelia.groza@nxp.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"linuxppc-dev @ lists . ozlabs . org"
<linuxppc-dev@lists.ozlabs.org>,
"David S . Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next v6 6/9] net: dpaa: Convert to phylink
Date: Tue, 4 Oct 2022 19:48:32 +0100 [thread overview]
Message-ID: <YzyAADoHpExvo6XE@shell.armlinux.org.uk> (raw)
In-Reply-To: <20220930200933.4111249-7-sean.anderson@seco.com>
On Fri, Sep 30, 2022 at 04:09:30PM -0400, Sean Anderson wrote:
> +static void memac_validate(struct phylink_config *config,
> + unsigned long *supported,
> + struct phylink_link_state *state)
> +{
> + __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
> + struct fman_mac *memac = fman_config_to_mac(config)->fman_mac;
> +
> + phylink_generic_validate(config, supported, state);
> +
> + if (phy_interface_mode_is_rgmii(state->interface) &&
> + memac->rgmii_no_half_duplex) {
> + phylink_caps_to_linkmodes(mask, MAC_10HD | MAC_100HD);
> + linkmode_andnot(supported, supported, mask);
> + linkmode_andnot(state->advertising, state->advertising, mask);
> + }
> +}
Having been through the rest of this with a fine tooth comb, nothing
else stands out with the exception of the above, which I think could
be done better with this patch:
http://git.armlinux.org.uk/cgit/linux-arm.git/commit/?h=net-queue&id=e65a47c4053255bd51715d5550e21c869971258c
Since the above would become:
static void memac_validate(struct phylink_config *config,
unsigned long *supported,
struct phylink_link_state *state)
{
struct mac_device *mac_dev = fman_config_to_mac(config);
struct fman_mac *memac = mac_dev->fman_mac;
unsigned long caps;
caps = mac_dev->phylink_config.capabilities;
if (phy_interface_mode_is_rgmii(state->interface) &&
memac->rgmii_no_half_duplex)
caps &= ~(MAC_10HD | MAC_100HD);
phylink_validate_mask_caps(supported, state, caps);
}
If you want to pick up my patch that adds this helper into your series,
please do.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2022-10-04 18:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 20:09 [PATCH net-next v6 0/9] [RFT] net: dpaa: Convert to phylink Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 1/9] dt-bindings: net: Expand pcs-handle to an array Sean Anderson
2022-10-03 17:12 ` Rob Herring
2022-09-30 20:09 ` [PATCH net-next v6 2/9] dt-bindings: net: Add Lynx PCS binding Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 3/9] dt-bindings: net: fman: Add additional interface properties Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 4/9] net: fman: memac: Add serdes support Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 5/9] net: fman: memac: Use lynx pcs driver Sean Anderson
2022-10-04 15:25 ` Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 6/9] net: dpaa: Convert to phylink Sean Anderson
2022-10-04 16:13 ` Russell King (Oracle)
2022-10-04 16:20 ` Sean Anderson
2022-10-04 18:48 ` Russell King (Oracle) [this message]
2022-09-30 20:09 ` [PATCH net-next v6 7/9] powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 8/9] powerpc: dts: qoriq: Add nodes for QSGMII PCSs Sean Anderson
2022-09-30 20:09 ` [PATCH net-next v6 9/9] arm64: dts: layerscape: " Sean Anderson
2022-10-04 15:28 ` [PATCH net-next v6 0/9] [RFT] net: dpaa: Convert to phylink Sean Anderson
2022-10-04 16:52 ` Jakub Kicinski
2022-10-04 17:26 ` Sean Anderson
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=YzyAADoHpExvo6XE@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=camelia.groza@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=madalin.bucur@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sean.anderson@seco.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).