Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3678866pxb; Mon, 24 Jan 2022 15:09:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/Nkqc/ivca9YyT1ufTBuuqixwfin2l1jqu3qsqn1DMhrYRXx156BPBamzch7lkfvuB/jJ X-Received: by 2002:a17:90b:384d:: with SMTP id nl13mr604414pjb.46.1643065661525; Mon, 24 Jan 2022 15:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643065661; cv=none; d=google.com; s=arc-20160816; b=KCiFiyBX0f2zvdS6E+nPXVQ0YqRM8WnUaYmMj283J3WPKyhyRKhuqPAxQ9wUb3QW2z MF4LtnI1bG5n5kIm+dOBaFayS7jEB7ma56HRAU7W5OsGD7z3GUad9y/6NKo/Ecc5f8+I 8uyt/mQWaHGKoz7GSVH7hmXOwgynhuWmBEIpw8CWDAr2H+9X5rSWObFUBtljMB+yy6pG iEtOs/P2UJa036qm3sMNoM4GTfNQZdMBQMSZDruV4TDKs4yPiC/q6iV6jnjnZD9BZ6l8 ZmKzaDO0+1Ao7+ktYoMn+NATzXPKH1cHTzJWFOb4Nqh7sBWx0Hb/TKB3clx1rgTr6UFY 0FHQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QLs7i9IEEE3MlLWtUyitgd7sJHaENcp7qPbD2gNHVts=; b=x1ec+ubeUUDSqEZUDMZfxEBnH6nSEggysEu5nP9m2nXrln+1V5DK0/v9TcYI9j1WcB qKlDHzokIfea3rmyxk7QIa/3y+r9vyGRGdmCIRZZr842CnT9mPktFe84tb+DJxK5vb3K RoI3LkJO5eXvS4dyZnpLZuo+ZKGls7MEXhOEeaD1F0A6xRJUwXnbOGpx5F4TPle1Uy52 PKRZ7nCPKfVG0WbqgH5MXDI3iB9y4eGGuYPF7URCZqXNRpdTFu1UF1bqrFaG+6rqw1Y/ wlpJfV0vWvAsrzZQWj7M9y++IIToGuBCFSGFqVsEMHTZf/lG1E2JVQ35FwQDjA8nZlek FJxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vDCuDoLY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d24si14998196pgv.739.2022.01.24.15.07.29; Mon, 24 Jan 2022 15:07:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vDCuDoLY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1843393AbiAXXDz (ORCPT + 99 others); Mon, 24 Jan 2022 18:03:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1457894AbiAXVzG (ORCPT ); Mon, 24 Jan 2022 16:55:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0085C07E2A4; Mon, 24 Jan 2022 12:36:38 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9178961535; Mon, 24 Jan 2022 20:36:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CDAAC340E5; Mon, 24 Jan 2022 20:36:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056598; bh=cIVsYXY5t94PiqfXWViR/Oi0njjK/oBXtpCVnbK2xrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vDCuDoLYb1l6mtmbdUKZ45Jml+amoKLjOYlekNvNdBMRp04LIqFRneVNFau08DQPi ymUUJ4Uhu2/qgbr0g7d/kzOZTxdacLYIKC2H8hu6Zw0H2f6Ry/Yexv+haBVzDi1A2p B5ZVoRrkGQGKceZ5Ik6p7n9uE9na2MaYJAI+nRrA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tom Lendacky , "Russell King (Oracle)" , Andrew Lunn , Florian Fainelli , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 536/846] net: phy: prefer 1000baseT over 1000baseKX Date: Mon, 24 Jan 2022 19:40:53 +0100 Message-Id: <20220124184119.489770077@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Russell King (Oracle) [ Upstream commit f20f94f7f52c4685c81754f489ffcc72186e8bdb ] The PHY settings table is supposed to be sorted by descending match priority - in other words, earlier entries are preferred over later entries. The order of 1000baseKX/Full and 1000baseT/Full is such that we prefer 1000baseKX/Full over 1000baseT/Full, but 1000baseKX/Full is a lot rarer than 1000baseT/Full, and thus is much less likely to be preferred. This causes phylink problems - it means a fixed link specifying a speed of 1G and full duplex gets an ethtool linkmode of 1000baseKX/Full rather than 1000baseT/Full as would be expected - and since we offer userspace a software emulation of a conventional copper PHY, we want to offer copper modes in preference to anything else. However, we do still want to allow the rarer modes as well. Hence, let's reorder these two modes to prefer copper. Tested-by: Tom Lendacky Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Reported-by: Florian Fainelli Link: https://lore.kernel.org/r/E1muvFO-00F6jY-1K@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/phy/phy-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c index 2870c33b8975d..271fc01f7f7fd 100644 --- a/drivers/net/phy/phy-core.c +++ b/drivers/net/phy/phy-core.c @@ -162,11 +162,11 @@ static const struct phy_setting settings[] = { PHY_SETTING( 2500, FULL, 2500baseT_Full ), PHY_SETTING( 2500, FULL, 2500baseX_Full ), /* 1G */ - PHY_SETTING( 1000, FULL, 1000baseKX_Full ), PHY_SETTING( 1000, FULL, 1000baseT_Full ), PHY_SETTING( 1000, HALF, 1000baseT_Half ), PHY_SETTING( 1000, FULL, 1000baseT1_Full ), PHY_SETTING( 1000, FULL, 1000baseX_Full ), + PHY_SETTING( 1000, FULL, 1000baseKX_Full ), /* 100M */ PHY_SETTING( 100, FULL, 100baseT_Full ), PHY_SETTING( 100, FULL, 100baseT1_Full ), -- 2.34.1