From patchwork Fri Dec 13 19:35:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 13907790 X-Patchwork-Delegate: kuba@kernel.org Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 346FF1EF0BA; Fri, 13 Dec 2024 19:35:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734118521; cv=none; b=nGGSjsAT5zX0/tCVq2OxfkQ3YykdHGcUVFxDbglt5d6OFI2b32iI75N2AJsNugcYHMr+qyeB4Fh/UWOrHoQfzDeR8q3sWiqwzbiDASOont7kE+0Ak4dxQTb2z8auLQwku2i5U6wEVujub1BZrwZOZIqOI9uPEDTfRA3vZe3F0qU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734118521; c=relaxed/simple; bh=s9btBodUiB3cGnK0KICDoy591R3CdgCStze37OBzF7A=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=J65n2LJmCLVRMznCRVYTzAbL7Ii2LJbETmH3hqUwCCvY3c/XwGcs7TJjbmv2tyXN8d6AHXYGd1tgEFOgiJ46Fwk2FX4PiKs8rFli/qUjIcPcZ7teNTFAE9z8ebmQPmJocLDv6Sm/Lyv5yY9ix9yCmUcvFhlxZDobyyI48jQisD4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=rodsGVZV; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="rodsGVZV" 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=ABd+AOjaRP5bk7jBv3c6AzePtr2yGHsdlpUthvtnsxQ=; b=rodsGVZV6/+UQdxwu1Btu1TmLo NFw3yQRQ+LenklTb7E9BkZ4aQ4Tluk1/piS+Trnb984tMObnfu1pbT8hHGutS4I6vDQQ4XAXvxJO3 NDgr9CoaF6Vj9wWSfAu6xoiV70mRh0WYvhqNK/BJbloPJTMWTG1ZZWV0lUXU5ZkWLDNToQSZTdtN+ dlUv8TPQE6UBOmsWggIW8ixNdmhYncP6Ta7JPAKP27Tdpr/mZkTiDVzVVxl25SAUPjoiFLone+J1t aooOu3czXlAOg9MVeXVCgxN+xe/rtX4L3Ln6h4xpaOPhw6ODCToeF6DTW2CXkSZ3d97lM7WbsBybK CVdEZPig==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:41424 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.96) (envelope-from ) id 1tMBRN-0007Dw-0M; Fri, 13 Dec 2024 19:35:09 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1tMBRL-006van-3c; Fri, 13 Dec 2024 19:35:07 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Maxime Chevallier Cc: Alexandre Torgue , Jose Abreu , Andrew Lunn , davem@davemloft.net, Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexis =?utf-8?q?Lothor=C3=A9?= , Thomas Petazzoni , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 4/5] net: pcs: lynx: fill in PCS supported_interfaces Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Message-Id: Sender: Russell King Date: Fri, 13 Dec 2024 19:35:07 +0000 X-Patchwork-Delegate: kuba@kernel.org Fill in the new PCS supported_interfaces member with the interfaces that Lynx supports. Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier --- drivers/net/pcs/pcs-lynx.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/pcs/pcs-lynx.c b/drivers/net/pcs/pcs-lynx.c index 767a8c0714ac..6457190ec6e7 100644 --- a/drivers/net/pcs/pcs-lynx.c +++ b/drivers/net/pcs/pcs-lynx.c @@ -334,9 +334,19 @@ static const struct phylink_pcs_ops lynx_pcs_phylink_ops = { .pcs_link_up = lynx_pcs_link_up, }; +static const phy_interface_t lynx_interfaces[] = { + PHY_INTERFACE_MODE_SGMII, + PHY_INTERFACE_MODE_QSGMII, + PHY_INTERFACE_MODE_1000BASEX, + PHY_INTERFACE_MODE_2500BASEX, + PHY_INTERFACE_MODE_10GBASER, + PHY_INTERFACE_MODE_USXGMII, +}; + static struct phylink_pcs *lynx_pcs_create(struct mdio_device *mdio) { struct lynx_pcs *lynx; + int i; lynx = kzalloc(sizeof(*lynx), GFP_KERNEL); if (!lynx) @@ -348,6 +358,9 @@ static struct phylink_pcs *lynx_pcs_create(struct mdio_device *mdio) lynx->pcs.neg_mode = true; lynx->pcs.poll = true; + for (i = 0; i < ARRAY_SIZE(lynx_interfaces); i++) + __set_bit(lynx_interfaces[i], lynx->pcs.supported_interfaces); + return lynx_to_phylink_pcs(lynx); }