Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7186066rdb; Wed, 3 Jan 2024 07:20:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWHN/RP3jspHiHo6YWWo8xQIFx12KKzPxog953cWAAusQSG/cMyHpzdUVFO0XvgFoyVDWF X-Received: by 2002:a05:651c:486:b0:2cc:3fb2:82c with SMTP id s6-20020a05651c048600b002cc3fb2082cmr6828994ljc.75.1704295245452; Wed, 03 Jan 2024 07:20:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704295245; cv=none; d=google.com; s=arc-20160816; b=R6aolrAT4M9NE6E3x6C6Us2SorHtaVGpANai6o1AyocbwL9N0KRgUzAIJGt2kqDm0s XsVfw6YmWD/OWDofZNqctYYvuok/14cKV9dxvdbvWYTbFqK2a24nNIFmQ4/do9z6lTUU B5j+Q/rbj/iN/A1BdPJMj88MD/ZpYysU6zIFz/ZUwWl49DmlMQB/P8AS11QKXtGVmq5l 2Lb0G8OpLrsQzOoYpr3PzzPEskL/OgXt0Rfy7saLWT5ouEKQJN9TVDdid//1tBks1Rcd G7hWC+ZP8yDu5JOcDPCmQpXnYLjAUL9ClnjvYE6097FIM5/H8eu6T77CvSu2WDZqBUsF FoRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=m8sac+OI422yNvHd7yq1KwdsQdE6JGin4RzHy40w56s=; fh=FfJ1xRAKrh3nWD7+wuFBQbqJREpiOgPJEPDR50ezu9U=; b=HZPamsD1WHojm7BvuIb5kkcdQLG8sCdWcxcHggpiXQOIkSPjFStAISytEOJoMz83nk SHnoFp40qzfMO6U37qW8x/3EiAf+lkRZqa205lo0rwwTNzX/df3L2sIxntO3dqpBKUJS 9wcv3bR7ZwyMvoOKMNm7yYYzVntieLLlKUdldLKyEybQsoHopAA1yIN8z+re82vf9K4i 3xdBFA2QfpUUWj1vU/o7MG9D9cMgXIyZN8HyarwrgRfKgUzIhwLsuARQMBq102d6UoIj S3kUjMQu6h8SWZdJ7iz6r/QPqVtMOQOddYitM4zIzf9rfJ6XYMhuTXQQquqmxLOnDufS HcKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Kv0YNK7+; spf=pass (google.com: domain of linux-kernel+bounces-15695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v21-20020a50d595000000b005538ad08b5dsi12628203edi.611.2024.01.03.07.20.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 07:20:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Kv0YNK7+; spf=pass (google.com: domain of linux-kernel+bounces-15695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 306DE1F2465A for ; Wed, 3 Jan 2024 15:20:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 306CF1B263; Wed, 3 Jan 2024 15:20:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="Kv0YNK7+" X-Original-To: linux-kernel@vger.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 66D2F1B26C; Wed, 3 Jan 2024 15:20:34 +0000 (UTC) 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 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=m8sac+OI422yNvHd7yq1KwdsQdE6JGin4RzHy40w56s=; b=Kv0YNK7+rps9DdBGGO5WXeGDhB cS+HBcQYXuZCcEZ1ILAqsUv17vyuyM99oIggzYSP1WjPXt1stuAQHjPETsE2paOLu1LXXMr0Cod/F r9mSDrsW3O37Uf0mFwyPe2Y899uuLdsxMFXaRxPDeZ+mtcBTMzcIZ05BD0w/LNfcHkKI3shgm5I7A M6IM92vazLEVB/Q074wQfF5c3IAcH2mPMm7awXq11ZnAh+GlWkYui5NSCkXGivSRsNOZxAK0mAhl2 nEP+dDC/kbku4oHEmenNVHzTjsJN5QbiDglXWHenifScisk5FeGub4uowuKjxZo9JAwpHxRj8Jh1a 0JQEKCkQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:32952) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rL32f-0007dm-2k; Wed, 03 Jan 2024 15:20:25 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rL32f-0006U5-D9; Wed, 03 Jan 2024 15:20:25 +0000 Date: Wed, 3 Jan 2024 15:20:25 +0000 From: "Russell King (Oracle)" To: Maxime Chevallier Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?iso-8859-1?Q?K=F6ry?= Maincent , Jesse Brandeburg , Jonathan Corbet , Marek =?iso-8859-1?Q?Beh=FAn?= , Piergiorgio Beruto , Oleksij Rempel , =?iso-8859-1?Q?Nicol=F2?= Veronese , Simon Horman Subject: Re: [PATCH net-next v5 02/13] net: sfp: pass the phy_device when disconnecting an sfp module's PHY Message-ID: References: <20231221180047.1924733-1-maxime.chevallier@bootlin.com> <20231221180047.1924733-3-maxime.chevallier@bootlin.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: <20231221180047.1924733-3-maxime.chevallier@bootlin.com> Sender: Russell King (Oracle) On Thu, Dec 21, 2023 at 07:00:35PM +0100, Maxime Chevallier wrote: > Pass the phy_device as a parameter to the sfp upstream .disconnect_phy > operation. This is preparatory work to help track phy devices across > a net_device's link. > > Signed-off-by: Maxime Chevallier > --- > V5: No changes > V4: No changes > V3: No changes > > drivers/net/phy/phy_device.c | 8 ++++++++ > drivers/net/phy/phylink.c | 3 ++- > drivers/net/phy/sfp-bus.c | 4 ++-- > include/linux/sfp.h | 2 +- > 4 files changed, 13 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c > index d7c0812bd107..aad78e3f7894 100644 > --- a/drivers/net/phy/phy_device.c > +++ b/drivers/net/phy/phy_device.c > @@ -266,6 +266,14 @@ static void phy_mdio_device_remove(struct mdio_device *mdiodev) > > static struct phy_driver genphy_driver; > > +static struct phy_link_topology *phy_get_link_topology(struct phy_device *phydev) > +{ > + if (phydev->attached_dev) > + return &phydev->attached_dev->link_topo; > + > + return NULL; > +} > + > static LIST_HEAD(phy_fixup_list); > static DEFINE_MUTEX(phy_fixup_lock); > This should be in a different patch, it seems unrelated to the remainder of this patch, and as it's static and no other changes to this file, this would cause a build warning. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!