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 X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9C6AC43603 for ; Wed, 11 Dec 2019 10:56:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C5ED2073B for ; Wed, 11 Dec 2019 10:56:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="wtfR21xJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728550AbfLKK4C (ORCPT ); Wed, 11 Dec 2019 05:56:02 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:39488 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726119AbfLKK4C (ORCPT ); Wed, 11 Dec 2019 05:56:02 -0500 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=84Uw+wKxJuP/6nl1FKFjmW2R1Fq1kx4EfWtTMH1v1xQ=; b=wtfR21xJNttzvF4m3+pSpHhjXK X9ObwIyOcCmzU5Yg8Cf60NHNaS30wzKjlXQoNq34gHkSjES4Ray5aZcvJHVpZY2bBQeMQGuzMqnvQ J7rwLqQYAztHjjbP3u3eX8AGgYZaRlJuMLMeiDUBHIa8OK+leETBueuBZp6Xtl6c8NJojjjKOM1mP uRLk0ZaT1Zbr/aE4yZ5UGdfQwY8jXTaZqyNjKJbuyt8uRlk92ozGhaRWsMq29dbhRy5AgA9fJ/05U qjTFBtse1mKZCVB9B+ZY89OAfIsjOpwO7steytR0xugWB2wVt5V6DaftIVc18HYwSzlKYid2agSEv oWIeQYdg==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:60970 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iezes-0007u7-WC; Wed, 11 Dec 2019 10:55:55 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iezes-0002xe-CA; Wed, 11 Dec 2019 10:55:54 +0000 In-Reply-To: <20191211104821.GB25745@shell.armlinux.org.uk> References: <20191211104821.GB25745@shell.armlinux.org.uk> From: Russell King To: Andrew Lunn , Florian Fainelli , Heiner Kallweit Cc: "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH net-next v3 01/14] net: sfp: remove incomplete 100BASE-FX and 100BASE-LX support MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Date: Wed, 11 Dec 2019 10:55:54 +0000 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The 100BASE-FX and 100BASE-LX support assumes a PHY is present; this is probably an incorrect assumption. In any case, sfp_parse_support() will fail such a module. Let's stop pretending we support these modules. Reviewed-by: Andrew Lunn Signed-off-by: Russell King --- drivers/net/phy/sfp-bus.c | 4 +--- drivers/net/phy/sfp.c | 13 +------------ 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c index 5a72093ab6e7..02ab07624c89 100644 --- a/drivers/net/phy/sfp-bus.c +++ b/drivers/net/phy/sfp-bus.c @@ -342,9 +342,7 @@ phy_interface_t sfp_select_interface(struct sfp_bus *bus, if (phylink_test(link_modes, 2500baseX_Full)) return PHY_INTERFACE_MODE_2500BASEX; - if (id->base.e1000_base_t || - id->base.e100_base_lx || - id->base.e100_base_fx) + if (id->base.e1000_base_t) return PHY_INTERFACE_MODE_SGMII; if (phylink_test(link_modes, 1000baseX_Full)) diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c index 27360d1840b2..ae6a52a19458 100644 --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c @@ -1489,18 +1489,7 @@ static void sfp_sm_fault(struct sfp *sfp, unsigned int next_state, bool warn) static void sfp_sm_probe_for_phy(struct sfp *sfp) { - /* Setting the serdes link mode is guesswork: there's no - * field in the EEPROM which indicates what mode should - * be used. - * - * If it's a gigabit-only fiber module, it probably does - * not have a PHY, so switch to 802.3z negotiation mode. - * Otherwise, switch to SGMII mode (which is required to - * support non-gigabit speeds) and probe for a PHY. - */ - if (sfp->id.base.e1000_base_t || - sfp->id.base.e100_base_lx || - sfp->id.base.e100_base_fx) + if (sfp->id.base.e1000_base_t) sfp_sm_probe_phy(sfp); } -- 2.20.1