Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp215088pxb; Wed, 23 Mar 2022 16:38:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOFQsD8/HoNOWKGHgK6qcLb8WTwmlev/a/tx+tR+406jmHpJe4G58eHXuAxFKForW1Dac9 X-Received: by 2002:a17:907:6ea2:b0:6e0:4ef5:1a2c with SMTP id sh34-20020a1709076ea200b006e04ef51a2cmr2855858ejc.350.1648078725384; Wed, 23 Mar 2022 16:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648078725; cv=none; d=google.com; s=arc-20160816; b=ilOmiwUYoERniTiSHJcbwcEK8keTrP1iJOrHVnaGq7PWP1ctIczW/GKDkqr00JFof8 2boB9Xai5YlQaxuWKIuCDLNNvC3irhC+YWR4NYLjEIe49k5wHoUNcjr5b4aMMcaAX/Fu 1JW8LSu3uCGa4CxO9E2mUZN7UVSkvMTFt8fmh8Nwic6sI/UCNiFb79eHNqGXleVREOdw QjkySAWLRUKPyNWdg3LBDG99q7lqlwLcSpoa5jKaZ1slBL+2dRlBQkfbq8W8LT4dl+jM ELnfREHQKlASsxg02VgtHK7eEFKJaZu92cNlITr7UxFJyqzu0VfvXz414LW0dzTzJb3N whuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ss8GFR5rljClvU8CctXDwTGOGTKBTAeyK5+ukBPrIgk=; b=bNS0e0zvsJVg+ULUuooV9H610HYJVnM2V2S2IxwBrxD5xYEKH+0UoM16bbw16YUxKa iq34caRqEQQrhVeTyG59wwSifyvaBpWrIBTxbguOYYa3lN9rCTSYBr0FH5wEehWoOMuK ORPXrszIl/xEsjewpJX8e/FXHm2sLlGIO43GPzO8FzcPaOnzdFRvKUFVYaF7SCaWJSvd GwGhqu3dURqIZmPnazPxE5uYf+Fs9JFYFEo6WzSQhiX7zCB6SJOjBVZz8sfXoVKyAxcU r7PzzYYiaBdkyChDSOSzZlXywb8aL8F2GJzWM/hR5GZLrcSMDwt1QwUjHfRIqQVGf5aW qpdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="DVHyGE/j"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020a170906530e00b006e021f4c205si8993458ejo.874.2022.03.23.16.38.17; Wed, 23 Mar 2022 16:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="DVHyGE/j"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343994AbiCWSgm (ORCPT + 99 others); Wed, 23 Mar 2022 14:36:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240154AbiCWSgE (ORCPT ); Wed, 23 Mar 2022 14:36:04 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D48E62A20; Wed, 23 Mar 2022 11:34:34 -0700 (PDT) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id C34FF223F7; Wed, 23 Mar 2022 19:34:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1648060470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ss8GFR5rljClvU8CctXDwTGOGTKBTAeyK5+ukBPrIgk=; b=DVHyGE/jkdERvSTtUFF1a1JtXRfnREW6qcbLacNXBm2wWJYptvlN7brbpdEVGevGST6exd XwI2IGK3xrPrGhNTLHA6y3W1BM16j7iq3nBeoaNNVJQh4jnrc5CVd9nrS8ErZCRia0OU4Z UPhhrCckKrsqctgEVLw5FvYtQaKWJ3Q= From: Michael Walle To: Andrew Lunn , Heiner Kallweit , Russell King , Jakub Kicinski , Paolo Abeni Cc: "David S . Miller" , Xu Liang , Alexandre Belloni , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Walle Subject: [PATCH RFC net-next 5/5] net: phylink: handle the new is_c45_over_c22 property Date: Wed, 23 Mar 2022 19:34:19 +0100 Message-Id: <20220323183419.2278676-6-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220323183419.2278676-1-michael@walle.cc> References: <20220323183419.2278676-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Phylink treats C45 PHYs in a special way and assumes they can switch their SerDes lanes between modes. This check is done by looking at the is_c45 property. But there are PHYs, namely the GPY215, which are C45 PHYs but behind a C22 bus. Thus while the PHY is a C45 one, the is_c45 property is not set because it uses indirect MMD access via the C22 registers. Therefore, add the is_c45_over_c22 property to the check, which indicates this sort of PHY handling. Signed-off-by: Michael Walle --- drivers/net/phy/phylink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 06943889d747..633cccfbd5f4 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -1369,7 +1369,7 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy, * speeds. We really need to know which interface modes the PHY and * MAC supports to properly work out which linkmodes can be supported. */ - if (phy->is_c45 && + if ((phy->is_c45 || phy->is_c45_over_c22) && interface != PHY_INTERFACE_MODE_RXAUI && interface != PHY_INTERFACE_MODE_XAUI && interface != PHY_INTERFACE_MODE_USXGMII) -- 2.30.2