From patchwork Fri Jun 9 08:03:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13273385 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 6C4B3C7EE25 for ; Fri, 9 Jun 2023 08:03:41 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aG9Ger61UFBWLG10OCZiT7sTOIJehimba14rfbqpi5c=; b=a2hLT0t4tsjOYR eVckvQhsSvsiyM/Z0RCgQDoJoGysc8kv/2LStVDA29TSFc0lbBrMJW2FI7A16E+qIxK2c8ZHmt2NE YvD8QBHIrHBJIBi6zS8UyufJcuqdE/K94FPvjqKWcOB+dvG7jNlE7zGY9l4qTvf8O7hgP90tyPyYY RsLMaCW8UUuVZfGVoEX6cka/IwfNPOzygH4yzvpcUwXTcHD0EoTQFy6ng4atBkYymiUTaAL38yZJr dcp33WzDcp9FDxszwJRALkGE5GEnOaflEvkk8MhEg7rCL5lOJ5hGlk9O4QNXxMFpON4+C1Xre9H9D OFH+ST6vSY7W4rgFAGSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7X5X-00CAGb-0V; Fri, 09 Jun 2023 08:03:15 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7X5U-00CAFZ-0c for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 08:03:14 +0000 X-GND-Sasl: maxime.chevallier@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1686297790; 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=iM8ydqGhr2n/tsxrZM65WHkskm2cjecADl+Ygc3iZ0A=; b=fe/zlv2hrnEWfJez2MvwUhGPcNucsfrbwVy999jQgZDLfPjTUfni45DIkKcos1BllLkKmw H/IyWzpXD3BfL5FPiDdm6xcGRv92nEvOoLM/2/By4FZkV2zafLJQIUMxCdbDg/O//7fTaz Rqf/a+kMRkbVe1kD0c8s4LTvdEbsvziG5edrsgS57VqJfAi7b79V+IDl5WdHy00iMdqQsW dMk8eGplGfi8FqE1rbewap2wsmoWYOMnFh9zufFvDhlq4miZYF/DK+arbyj8nb158TiJt2 di5uqVe+gWtZOk3/og1ocJqowZMmcgrYoktOD7NKa/SJcnRQXzMuiWonTY77CA== X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 60AEBC000D; Fri, 9 Jun 2023 08:03:09 +0000 (UTC) From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Horatiu.Vultur@microchip.com, Allan.Nielsen@microchip.com, UNGLinuxDriver@microchip.com, Vladimir Oltean , Simon Horman Subject: [PATCH net v2 1/2] net: phylink: report correct max speed for QUSGMII Date: Fri, 9 Jun 2023 10:03:04 +0200 Message-Id: <20230609080305.546028-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230609080305.546028-1-maxime.chevallier@bootlin.com> References: <20230609080305.546028-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230609_010312_527576_3CA0B0DA X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Q-USGMII is the quad port version of USGMII, and supports a max speed of 1Gbps on each line. Make so that phylink_interface_max_speed() reports this information correctly. Fixes: ae0e4bb2a0e0 ("net: phylink: Adjust link settings based on rate matching") Signed-off-by: Maxime Chevallier --- V1->V2: No changes 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 508434fd4da8..590469261b98 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -205,6 +205,7 @@ static int phylink_interface_max_speed(phy_interface_t interface) case PHY_INTERFACE_MODE_RGMII_ID: case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_QSGMII: + case PHY_INTERFACE_MODE_QUSGMII: case PHY_INTERFACE_MODE_SGMII: case PHY_INTERFACE_MODE_GMII: return SPEED_1000; @@ -221,7 +222,6 @@ static int phylink_interface_max_speed(phy_interface_t interface) case PHY_INTERFACE_MODE_10GBASER: case PHY_INTERFACE_MODE_10GKR: case PHY_INTERFACE_MODE_USXGMII: - case PHY_INTERFACE_MODE_QUSGMII: return SPEED_10000; case PHY_INTERFACE_MODE_25GBASER: