From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DF41C433FE for ; Tue, 4 Oct 2022 18:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IBvtFHGN91gCy5jumpd5214IZGNBOyvJmaK+t1nxoao=; b=a1HwurxxM8mC2p ftrdxwOnJA39FPm3A3Z7I0NlGtCsaTe+4ZY8RS0vu/bnfsRfkTPKMHUMOGTgYNfwiB4c5VITsQ2su T1fLtHEi+uIGwuT9DlVFxuuYZoxcyLxziZ4qcp8IabuaNQYePxSyf6Xhxnta3fJOxHmYGP17N4LII TbP7X6+NEC4wsc9y9Oy7+dLZTjNgqr0xrefUseWpo7yFYpuTfeEnAjWYyzuunjDc/5LoU8ZUFMykf slTGYyWYzr7rrRaZbzL2DJUKuCwUAit4/IU1CgJ3E98GXVHCBkjcn3RpGXOzKnonShopO3wTIqq76 okMFbQpfkWXJnASwngmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofmyK-00AhWg-PW; Tue, 04 Oct 2022 18:48:52 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofmyH-00AhVa-MV for linux-arm-kernel@lists.infradead.org; Tue, 04 Oct 2022 18:48:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dF82zEweBR6fURXs87QKoPIU10/wyDMoBMuKcKxbCsw=; b=d0wFHXUGjqakfSh7afsSgf3RRB OT8a0L76nJh3fk/DCEhHtF8iYPeVQKVOexG133WwReAh9NXuOBwZEnIx4Xl0kyKihbyxUPx4i+zQj eC7ERK6/BNr8qbSs005EU7PeROav2iTSEeZHTFgg8KAUMFjmoEUygbP/zfVQpD6X5iKMRxAQWok2f xZum0cUHhxAjlt1XkKUV3P8B3sezjfw1r/IRycgtAnbFOAB8hqK3XAPJuEiy6gm6rfLS8HhJjBLal 7Rl1eizXkUJ8P/kGvr0f1heBrU3HvvB1jK8W5DoveYwiFIS31Dxb/pMBufvlD7LJnoKqKTpiHlc5b 9V3vvf9A==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34586) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ofmy4-0008Le-Nz; Tue, 04 Oct 2022 19:48:36 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ofmy0-0004bi-Eh; Tue, 04 Oct 2022 19:48:32 +0100 Date: Tue, 4 Oct 2022 19:48:32 +0100 From: "Russell King (Oracle)" To: Sean Anderson Cc: "David S . Miller" , Jakub Kicinski , Madalin Bucur , Camelia Alexandra Groza , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Paolo Abeni , Eric Dumazet , "linuxppc-dev @ lists . ozlabs . org" Subject: Re: [PATCH net-next v6 6/9] net: dpaa: Convert to phylink Message-ID: References: <20220930200933.4111249-1-sean.anderson@seco.com> <20220930200933.4111249-7-sean.anderson@seco.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220930200933.4111249-7-sean.anderson@seco.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221004_114849_753943_7D6A5B4D X-CRM114-Status: GOOD ( 12.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel