Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp652263lqb; Fri, 24 May 2024 09:07:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUlDdDvRL0bDeElQzRwgrf0eIvLZ4fPSftmrDYD5dkHOoXbhVpeyzhfaj6Sn/tPEOB1xdyfEDFnXjIWlnlj4V2gWhjQRwFUR/NPzrnqFA== X-Google-Smtp-Source: AGHT+IGuj+cMhRYq2cFR3erqdIBqCs/dlvjBMM1fvLJDrvwedRMyjeCOsqkPlVdy8+IpzCzQ3vJh X-Received: by 2002:ac8:7d0f:0:b0:43e:3d29:4313 with SMTP id d75a77b69052e-43fb0dc00cbmr28585081cf.10.1716566865864; Fri, 24 May 2024 09:07:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716566865; cv=pass; d=google.com; s=arc-20160816; b=ulg+h1Um0jNaYYIH4LeS5bJirmfzZrksr477z5oIMMbtn88uvXtj6L3Dof+UJ1wtTr DjaZaO1SrQNRC/OFaJhecyrotm5jzh0tRKTLWDCjNrgn7xQXTpAXpJAg8ef6k6M1D52H 8pw5m3DznXRZUgqs9hm9z4IIKvlvthA1KIAz+/1incXdiFsMKv0JqfIwty5BjaU+yyn5 EFMk5yr8SeOrejcxyx/GGLiwR1RlWV5Qb0HPWn99iSjIFLmhzCZEGKguXsVwvD4NChHQ mvXApPq/oWCq7c+Ai/q8ehkHnNu9c07hTNlsY9x2k9TRbp0Bn5bfR444EUiziNAERlVm XThw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vB6ljBLofLeiWQTydwB3NoHusR29U8CF0lK7vzGBV4k=; fh=/F//+b3UzA76jGdRwWPWlmuxDCcEgixk9HwmSEECed0=; b=nCW124UHn9zPhxspBE7qhJM10kDWd3GNGw3pJg0oiVTctTP42XdjaQksT9lMEBtngT tRCrqPT0JK0lG48kudJTEk+nXdFVGx4hVuTj7+X5ooWda7nFVg6GEmBb5E3WRrqgQ7oJ 5KkYPNBQQTh7cxjlM74H6zibTkfLQ+Gy++X1Fx3gh6npfnIb1Xo5imnUHNn3Nf7W91ts x2/lyM+24tlCmalm5dlRmp/bX802RC0C8X/+pfGjFcNWQ0wnyTVlgKbOLDKL8GVaifru BVTk4mLrQlSEeYz8uNqJt6d/vi91IxLHUfbm4VceHyuTSBejCNStynay5wieC5wqZxr/ aIrA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=dgrOW9yZ; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-188916-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fb17ed3f9si21393611cf.198.2024.05.24.09.07.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 09:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188916-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=dgrOW9yZ; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-188916-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5517F1C21534 for ; Fri, 24 May 2024 16:07:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 482A912EBCB; Fri, 24 May 2024 16:07:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="dgrOW9yZ" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 B1FF712C485; Fri, 24 May 2024 16:07:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716566855; cv=none; b=lOb8yFklzQQdtJc1Dwddq3DwaWuRd7IGCLuOdEuZ0rTKv5j3U7/gDpAlcRwgCkNhbGkad84oTxG0hk5Tnl41fy1cZyiTNIVppE6o6/4xsFuxbGsnIZ2d9eTSpOPd4AN+PkmO34fX0DFzY4eTsj3w+S8udZ4DJ4BrUNrSJCUnR90= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716566855; c=relaxed/simple; bh=hsW39VYYa3d/7mjBY2RvXu3zpGRpwKQAxiKXlCqEIpw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tVgDP9lnsNljiGfx2dD6WSyVGBPCyco33bqFsXpEJCKmQMbzJ404riLS3MxMeo/opmbsFG2z+uWEfji6w7pTh+ZeKwChLBbvoOCF1HgLNL2xzdLUKQx7b6yTzPZad2qVooV7Yajy2wGwD5xFjipbhC/1VopFViZzc+zLIBG3Hj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=dgrOW9yZ; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=vB6ljBLofLeiWQTydwB3NoHusR29U8CF0lK7vzGBV4k=; b=dgrOW9yZhUJ6EgseHLKa2qObIE sEGtkvAhdwnXM08XCODga/KipPotgi20+vvPCR1cDu6WOBApKMAXlItaJmDtQ2XMOuMsF7P5RPLV0 KfCHV9QGtjRlOVeA1BRbsymDzHyqaQlHGjrJS+tx6GFAztkhtiZbK583Hrz6CbFZlVGE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sAXRr-00Fxrz-17; Fri, 24 May 2024 18:07:15 +0200 Date: Fri, 24 May 2024 18:07:15 +0200 From: Andrew Lunn To: Sneh Shah Cc: Vinod Koul , Bhupesh Sharma , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Halaney , Russell King , kernel@quicinc.com Subject: Re: [PATCH net-next 2/2] net: stmmac: dwmac-qcom-ethqos: Enable support for 2500BASEX Message-ID: References: <20240524130653.30666-1-quic_snehshah@quicinc.com> <20240524130653.30666-3-quic_snehshah@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240524130653.30666-3-quic_snehshah@quicinc.com> On Fri, May 24, 2024 at 06:36:53PM +0530, Sneh Shah wrote: > With integrated PCS qcom mac supports both SGMII and 2500BASEX mode. > Implement get_interfaces to add support for 2500BASEX. I don't know this driver very well..... but /* PCS defines */ #define STMMAC_PCS_RGMII (1 << 0) #define STMMAC_PCS_SGMII (1 << 1) #define STMMAC_PCS_TBI (1 << 2) #define STMMAC_PCS_RTBI (1 << 3) static int stmmac_ethtool_get_link_ksettings(struct net_device *dev, struct ethtool_link_ksettings *cmd) { struct stmmac_priv *priv = netdev_priv(dev); if (!(priv->plat->flags & STMMAC_FLAG_HAS_INTEGRATED_PCS) && (priv->hw->pcs & STMMAC_PCS_RGMII || priv->hw->pcs & STMMAC_PCS_SGMII)) { struct rgmii_adv adv; u32 supported, advertising, lp_advertising; if (!priv->xstats.pcs_link) { cmd->base.speed = SPEED_UNKNOWN; cmd->base.duplex = DUPLEX_UNKNOWN; return 0; } /** * stmmac_check_pcs_mode - verify if RGMII/SGMII is supported * @priv: driver private structure * Description: this is to verify if the HW supports the PCS. * Physical Coding Sublayer (PCS) interface that can be used when the MAC is * configured for the TBI, RTBI, or SGMII PHY interface. */ static void stmmac_check_pcs_mode(struct stmmac_priv *priv) { int interface = priv->plat->mac_interface; if (priv->dma_cap.pcs) { if ((interface == PHY_INTERFACE_MODE_RGMII) || (interface == PHY_INTERFACE_MODE_RGMII_ID) || (interface == PHY_INTERFACE_MODE_RGMII_RXID) || (interface == PHY_INTERFACE_MODE_RGMII_TXID)) { netdev_dbg(priv->dev, "PCS RGMII support enabled\n"); priv->hw->pcs = STMMAC_PCS_RGMII; } else if (interface == PHY_INTERFACE_MODE_SGMII) { netdev_dbg(priv->dev, "PCS SGMII support enabled\n"); priv->hw->pcs = STMMAC_PCS_SGMII; } } } I get the feeling this is a minimal hack, rather than a proper solution. Andrew --- pw-bot: cr