From mboxrd@z Thu Jan 1 00:00:00 1970 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 894BF2CA9; Thu, 2 Jan 2025 10:54:22 +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=1735815264; cv=none; b=eSPJYkutA5mFreBQohU0smsAMs8/qrZBa6x4TExXVdghKMNzFaAYnatgLTABT3A0vdBs+/Aj3OvsRbCY0jFMLwcTIl1kmG2DcyaBDmXIDCRBAmn1481aPERc1B6gJ7OubP2Mhvl/vWsyjw+M4MZ+WKo+d69BnKPtOt1Ecem6uck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735815264; c=relaxed/simple; bh=0Rpt7yMFe9eWHazP+kDrk6aUELB1oKw7sDcRPv+Owqg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=I1wPxtI4vRG3ozcNQvn5Avac5llJAE8IbSCjQkMRHQcR87bC7k/Co/mW3C74mgZLQPQ51Yg5cbp0y8ADW2G8xPbiLjVLuIff0g7clyXL9jNW1ZW0VQ7g7IruzYBmV4KTNKN2rJydCwoS2LHxc7Igc5bYM+6rsQe7VVC8DFZM1h8= 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=QPcYWPj6; 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="QPcYWPj6" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=sY0n+f+Bbc7kIzhzPEFT5STJFSdVmTvk9y+TqH5KuEQ=; b=QPcYWPj6Fr/2Of9KbSlYgSc/XY 89JslaJOFR5f5ca9V4yEnjmbtNhDV6E9Za10jBHVA2H8n83tYPznXlJuTujhWADzRtxoXEB9cw7Jt IoXWICqMNtXePEDt3G7zEX48ROL6urMrBU0rZ8q42rmlpi8u1bzMxCa8boZbQn/J3r7qyLg/YHiIr 1u8I/uTaRS1FzGcKiX8CPkvMr5+BIVnmMTaWJpbOrW89VnVc3jMPaVlyABdh/KhvIg9drdmwXDal0 8hsN6E8DxqE5U5zSr03bNUkkXqzBEdn9AxzPO+Kj50zETFFkq1upwziYoV4xwKeDyeLHos+ojaXii 5sxNNxOQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:41680) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tTIqC-0001uL-09; Thu, 02 Jan 2025 10:54:12 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.96) (envelope-from ) id 1tTIq9-0000DL-11; Thu, 02 Jan 2025 10:54:09 +0000 Date: Thu, 2 Jan 2025 10:54:09 +0000 From: "Russell King (Oracle)" To: Lei Wei Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , Heiner Kallweit , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, quic_kkumarcs@quicinc.com, quic_suruchia@quicinc.com, quic_pavir@quicinc.com, quic_linchen@quicinc.com, quic_luoj@quicinc.com, srinivas.kandagatla@linaro.org, bartosz.golaszewski@linaro.org, vsmuthu@qti.qualcomm.com, john@phrozen.org Subject: Re: [PATCH net-next v3 3/5] net: pcs: qcom-ipq9574: Add PCS instantiation and phylink operations Message-ID: References: <20241216-ipq_pcs_6-13_rc1-v3-0-3abefda0fc48@quicinc.com> <20241216-ipq_pcs_6-13_rc1-v3-3-3abefda0fc48@quicinc.com> Precedence: bulk X-Mailing-List: netdev@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: <20241216-ipq_pcs_6-13_rc1-v3-3-3abefda0fc48@quicinc.com> Sender: Russell King (Oracle) Hi, On Mon, Dec 16, 2024 at 09:40:25PM +0800, Lei Wei wrote: > +static int ipq_pcs_config_sgmii(struct ipq_pcs *qpcs, > + int index, > + unsigned int neg_mode, > + phy_interface_t interface) > +{ > + int ret; > + > + /* Access to PCS registers such as PCS_MODE_CTRL which are > + * common to all MIIs, is lock protected and configured > + * only once. > + */ > + mutex_lock(&qpcs->config_lock); > + > + if (qpcs->interface != interface) { > + ret = ipq_pcs_config_mode(qpcs, interface); > + if (ret) { > + mutex_unlock(&qpcs->config_lock); > + return ret; > + } > + } > + > + mutex_unlock(&qpcs->config_lock); Phylink won't make two concurrent calls to this function (it's protected by phylink's state_lock). Since this looks to me like "qpcs" is per PCS, the lock does nothing that phylink doesn't already do. > +static const struct phylink_pcs_ops ipq_pcs_phylink_ops = { > + .pcs_validate = ipq_pcs_validate, I would also like to see the recently added .pcs_inband_caps() method implemented too, so that phylink gets to know whether inband can be supported by the PCS. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!