From patchwork Wed Oct 23 13:41:17 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: 13847111 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 A0AE612B71 for ; Wed, 23 Oct 2024 13:41:26 +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=1729690891; cv=none; b=hx2gu71GQKoTSVy8wZsbY/m2Pkxv1bpSUwutFL1LFaWWsFQ8fBa108xCxmEd+/jxbcc5gi09WqkJ93x/jz6EayllTjwcYa/aQnnNL7xc4t92lyogW5mRPoc15jwuDMbJ42RdQoUit1a4QRpS046n8YUuiNv+Qv1HWrzPDX7ZJas= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729690891; c=relaxed/simple; bh=lEZi/t23+sJwkTnHRYVlC7SkLp2F6y8GPtaON0HJhno=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=egUajSTEwIzEZcfUVGTOec/lfmq2G9sPK+JTspjZXUuhAXpDikOOx5ou0mPhs15RoXaO6/jEQrittl2Wg+Z2Ih3D2/M1Z0WEZxMhoFfL4wOXQfZcWteJ831SZ2+Gi29uSSQVmGULzg1Pe0R4EjqEzfvR2RyZkttVvF9vmTaqWyU= 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=hoBuPhCs; 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="hoBuPhCs" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: 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:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CfuCPykxNhwUmxI5KtslFkMAwUPu7B72Zr3LX4mpMvo=; b=hoBuPhCsr5/611SL0VNqa+EYS/ QA3IxU+AVZ45FCHQU4+DIs8RqESnRcaVDLJEhDu6z1EYZQmdimFS3fZfXTbDnToblsbOFlAW2DXE5 cPHNxaDTVhw/UwFPB3k2EqK8pz7SJmz1sNFChGeRJ2jD4xikRX4J7Uhi+831kHD6KdZECc3RCvIun H7OdbMUOPUwakUBh5pgdV/9YCQn28AntpeGIzNYXH4s1xpOlyNid+VV6XFyE2EmDceD8CrSQgqtrC bHye6dB6BhgNNp+m/vGqSJoArYYliztNSn5mogsPEt7hzB4C9pr61NCfIz3wlyK7UxDO1mLq62b6m GukjPrFg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:53268) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1t3bc0-0006Ua-15; Wed, 23 Oct 2024 14:41:20 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.96) (envelope-from ) id 1t3bby-0003ja-05; Wed, 23 Oct 2024 14:41:18 +0100 Date: Wed, 23 Oct 2024 14:41:17 +0100 From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , netdev@vger.kernel.org, Paolo Abeni Subject: [PATCH net-next v2 0/3] net: phylink: simplify SFP PHY attachment Message-ID: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Sender: Russell King (Oracle) X-Patchwork-Delegate: kuba@kernel.org Hi, These two patches simplify how we attach SFP PHYs. The first patch notices that at the two sites where we call sfp_select_interface(), if that fails, we always print the same error. Move this into its own function. The second patch adds an additional level of validation, checking that the returned interface is one that is supported by the MAC/PCS. The last patch simplifies how SFP PHYs are attached, reducing the number of times that we do validation in this path. drivers/net/phy/phylink.c | 83 ++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 41 deletions(-) Changes since v1: - Fixed build warning. - Added r-b/t-b from Maxime.