From mboxrd@z Thu Jan 1 00:00:00 1970 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 5FC384084E; Tue, 2 Jul 2024 19:55:26 +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=1719950128; cv=none; b=U3aspHysgDjFguoLOt12Y1Am7JxDFSIV5pK/Vw8+//eM3t0r1gpE+nsU0/zqNefvAtMJkWPEICyOQcaxr3qVjuHrfrGOAACrA8KULNVBm8lL1vt9ONxXDz6j6BLPGOAWaWs06js2LI5V3n5Sp/u/xgOUUnW/U0+Z+UwHZTbBZP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719950128; c=relaxed/simple; bh=DYQzU9mLmqMY5MwJkjrPsB32iGb2jaHpxakRgbP3D1U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Oy6pEUz8NBLEczVZbItHyfGE63P3hqXJKtmR2UCVlyvfcGbM+Yk3UvzINUuaD9IzymJknW0z8vXz1uo8s0FD3MDfu//kEywGzAHRPW6g+6wdAaY1FdE7TBcRd6jT61rGMzX/hcyfCh0s3jjulTt6u1ZNNaawdjXM1boQ7AyS5Os= 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=zC3meLCN; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="zC3meLCN" 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=0aFPpcTE3yikrnw+fNhJl3nzvBnfs8+kSJz+WiTm5zI=; b=zC3meLCNci+F/kPQ4zn9MSw+vk d/cH3v58/sXnfNPTqKT8yRoWVp4KwYpgu+OZlD7913rqLrMzhrYQ7CT28MDtf6mwjc/G7P6R3COZy ykgqR/nWmoh3PrIv6v+6Nz3QfILFOn5LyrPrD8dPj7GbTvOjcHMpZRz2IRTWmLznkFB0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sOjau-001fSU-6Q; Tue, 02 Jul 2024 21:55:16 +0200 Date: Tue, 2 Jul 2024 21:55:16 +0200 From: Andrew Lunn To: "Russell King (Oracle)" Cc: Maxime Chevallier , Romain Gantois , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 5/6] net: phy: dp83869: Support SGMII SFP modules Message-ID: References: <20240701-b4-dp83869-sfp-v1-0-a71d6d0ad5f8@bootlin.com> <20240701-b4-dp83869-sfp-v1-5-a71d6d0ad5f8@bootlin.com> <2273795.iZASKD2KPV@fw-rgant> <20240702165628.273d7f11@fedora-5.home> 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: On Tue, Jul 02, 2024 at 07:13:50PM +0100, Russell King (Oracle) wrote: > On Tue, Jul 02, 2024 at 04:56:28PM +0200, Maxime Chevallier wrote: > > But I do agree with you in that this logic should not belong to any > > specific PHY driver, and be made generic. phylink is one place to > > implement that indeed, but so far phylink can't manage both PHYs on the > > link (if I'm not mistaken). > > This is not a phylink problem, but a phy*lib* implementation problem. > It was decided that phy*lib* would take part in layering violations > with various functions called *direct* from the core networking layer > bypassing MAC drivers entirely. > > Even with phy*link* that still happens - as soon as netdev->phydev > has been set, the networking core will forward PHY related calls > to that phydev bypassing the MAC driver and phylink. > > If we want to start handling multiple layers of PHYs, then we have > to get rid of this layering bypass. Or at least minimise them. SQI values probably don't cause an issue in this situation, that seems to be mostly automotive which is unlikely to have multiple PHYs. link_down_events probably should be cleaned up and set as part of ethtool_ops->get_link_ext_stats. All the plca is more automotive, i doubt there will be two PHYs involved there. PHY tunabled we need the work bootlin is doing so we can direct to towards a specific PHY. Going through the MAC does not help us. The same is true for PHY statistics. There are no PHY drivers which implement module_info, so that bypass can be deleted. Work is being done on tsinfo, etc. Cable test ideally wants to be run on the outer PHY, but again, the bootlin work should solve this. PSE and multiple PHYs also seems unlikely. So i don't think the problem is too big. Andrew