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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72439C433F5 for ; Fri, 25 Feb 2022 14:35:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230167AbiBYOgI (ORCPT ); Fri, 25 Feb 2022 09:36:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241172AbiBYOgA (ORCPT ); Fri, 25 Feb 2022 09:36:00 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 419421AE64E for ; Fri, 25 Feb 2022 06:35:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To: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=TwMbp2LXA223Grf+6iiVZWU9L6OvqvQFAlVUCV/PwpA=; b=ORvHe9Npp/qAMGs+n/zJrW/gW2 syMgcjoDRKCd8FXpZeTME2qZdmM4NfjCgL7J/+hIpQC2UZVyn3+6eLGp2rdcryW4rLUXbv5TFd5fZ TmK1tqKzpp6MfSepoUIWgJeJEFmSXqAxO3ued5cuT49muZ6iZxCXP4Sl5DkozSfGvqiSViRPzlNka 1a1hjSNLUaQA/TuW1+jvQjKP4Js9iDYagGNxvKZ3GFkDTcwoHUv18gnyYg7ZQ8MQ+P0BnkuseZnKR pcb9fpK1/shxuKrFkkFUuCeEPNdJSaw6S9U4uGgcY8ALsDxkKoosc4Jf1nA4kpZsdImAYF75lv0Us oSrHVQ+Q==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:46982 helo=rmk-PC.armlinux.org.uk) 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 1nNbgo-0005Wu-AO; Fri, 25 Feb 2022 14:35:22 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nNbgn-00Akik-MJ; Fri, 25 Feb 2022 14:35:21 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Alexandre Belloni , Claudiu Manoil , Vladimir Oltean Cc: Marek =?iso-8859-1?Q?Beh=FAn?= , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Subject: [PATCH RFC net-next 2/4] net: dsa: ocelot: remove interface checks MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Fri, 25 Feb 2022 14:35:21 +0000 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When the supported interfaces bitmap is populated, phylink will itself check that the interface mode is present in this bitmap. Drivers no longer need to perform this check themselves. Remove these checks. Signed-off-by: Russell King (Oracle) --- drivers/net/dsa/ocelot/felix_vsc9959.c | 6 ------ drivers/net/dsa/ocelot/seville_vsc9953.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c index a1be0e91dde6..4c635c46705e 100644 --- a/drivers/net/dsa/ocelot/felix_vsc9959.c +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c @@ -956,12 +956,6 @@ static void vsc9959_phylink_validate(struct ocelot *ocelot, int port, struct ocelot_port *ocelot_port = ocelot->ports[port]; __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; - if (state->interface != PHY_INTERFACE_MODE_NA && - state->interface != ocelot_port->phy_mode) { - linkmode_zero(supported); - return; - } - phylink_set_port_modes(mask); phylink_set(mask, Autoneg); phylink_set(mask, Pause); diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c index 2db51494b1a9..0ae8424c47e2 100644 --- a/drivers/net/dsa/ocelot/seville_vsc9953.c +++ b/drivers/net/dsa/ocelot/seville_vsc9953.c @@ -929,12 +929,6 @@ static void vsc9953_phylink_validate(struct ocelot *ocelot, int port, struct ocelot_port *ocelot_port = ocelot->ports[port]; __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, }; - if (state->interface != PHY_INTERFACE_MODE_NA && - state->interface != ocelot_port->phy_mode) { - linkmode_zero(supported); - return; - } - phylink_set_port_modes(mask); phylink_set(mask, Autoneg); phylink_set(mask, Pause); -- 2.30.2