Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5228129rdb; Wed, 13 Dec 2023 02:48:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMCIpCMwoI1AV7TmLKAf1okXOZREIkDrgU6dW1nm9bgGO4i/SqSD2HOeHwNxLhh01P4FxD X-Received: by 2002:a17:902:ab4d:b0:1d3:5da4:68e2 with SMTP id ij13-20020a170902ab4d00b001d35da468e2mr13859plb.70.1702464500074; Wed, 13 Dec 2023 02:48:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702464500; cv=none; d=google.com; s=arc-20160816; b=Ru4f5vVke5OlG03P7p9M0jwgFGsuljtxPzm8lFvSAhmaPNuFNHZniweNzjYu/qEcBM 0pWdkkNY+K1ZsQ9gvZrtJupLfK38wpeYr4ujlkb/0ZWwCDm6dPjYuLtdNOKV0ZbQTfrD I2hRmeZKSrjweK7IG0GTYvV/94WAV8Yl1KA9FOqau14EMHHMxIf3Lm+emavv723Go6Rx XjMzfqBLWrk73f+4UM4WyVVhSarl7TIGbTWY4nRwATn6+ratsknkbdNWbtCkAJpb22N4 rkc6opdNLlA9hf0E+md/kGIowssS7eVd7YJGRu7cbbZN/i0+EnDH5ZO2ofhNMjmQ9Z5X YNfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5wwbEC8DhP4/P3mp66T2IELploh6DQuZBdmSstEh2WY=; fh=J+EBaUpMscnC5m+SvRL4eszM3f2LwHoI7TfHaZHiEZ4=; b=gAkBmh87UL6nygiNwLaTyyROtekzmsW40bYtZLlpHitbchZ9H7V0GTNOH+YLkfk0dO sgtKnrb6xSL2aMwvybX8js/Kzr0jtGG9xMuXKh0a5xgxJrqx7ZGrh1rvfZzskz2xb41z xeEN/1DeU1q5ieT7GdE3ZcfBnGjT5PZ6ThET79Z10bliQY1F2Ci2cFYGxAjo13BdHGQs G+nEkbtX93GfHn1740jlnoJNYp8lCP7WyyW1Y6vpls5SyB2gkqsPS3CZVnk2eler/cwI s4n8MLCNtT3R3e/rzVTkLyzpgpv3/tCzseOdA1apdtC4w3gmAManDhthz1+GOtA+wjLy xJcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=uYfJXcpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id p8-20020a170903248800b001d0c906f613si9112342plw.492.2023.12.13.02.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 02:48:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=uYfJXcpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id AE10980702E7; Wed, 13 Dec 2023 02:48:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235325AbjLMKr7 (ORCPT + 99 others); Wed, 13 Dec 2023 05:47:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233311AbjLMKr6 (ORCPT ); Wed, 13 Dec 2023 05:47:58 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9730999; Wed, 13 Dec 2023 02:48:04 -0800 (PST) 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=5wwbEC8DhP4/P3mp66T2IELploh6DQuZBdmSstEh2WY=; b=uYfJXcpRp4fNICWR+8my+Gv207 MygnsXk7j+HBu/SGQaM8QMTZnNfY7RtLxMWAto0y7eUAnnaeMEBVw09Y0vixEF3H1X3r8fF9nxfFg HjkcK9dfnHqRxpkEkBWeQ5S4kmUAHauyxgPyNm4chP3NIrU+bSCDwUa0x97BhvEsBaHg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rDMmM-002oAs-UN; Wed, 13 Dec 2023 11:47:50 +0100 Date: Wed, 13 Dec 2023 11:47:50 +0100 From: Andrew Lunn To: Maxime Chevallier Cc: Daniel Golle , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: phy: skip LED triggers on PHYs on SFP modules Message-ID: References: <102a9dce38bdf00215735d04cd4704458273ad9c.1702339354.git.daniel@makrotopia.org> <20231212153512.67a7a35b@device.home> <20231213110622.29f53391@device.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231213110622.29f53391@device.home> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 13 Dec 2023 02:48:17 -0800 (PST) > > SFP LEDs are very unlikely to be on the front panel, since there is no > > such pins on the SFP cage. > > > > Russell, in your collection of SFPs do you have any with LEDs? > > I mean, aren't the led triggers generic so that it can trigger any > other LED to blink, and it's up to the user to decide ? Correct. However, generic LEDs won't be registered via this code path, so the deadlock is not an issue. Only LED controllers in a PHY within an SFP, inside an SFP cage are the issue here. I don't have any Copper SFP modules, so i've no idea if they are physically big enough to have LEDs? > I do however see one good thing with this patch is that it makes the > behaviour coherent regarding triggers regardless if we have a > media-converter or not. > > If we have a SFP bus with phylink as its upstream (SFP bus directly > connected to the MAC), then the phy is going to be attached through > phy_attach_direct(), and before this patch, led triggers will be > registered. > > If we have an intermediate PHY acting as a media-converter and > connected to the SFP bus, then the phy isn't attached to the net_device, > and the triggers aren't registered. > > So if in the end it doesn't make sense to register led triggers for > PHY in modules, it might be more coherent not registering them at all > as this patch does. What do you think ? I think it is all messy. Say the media converter has its LEDs connected to the front panel. You then get indications of activity on the front panel. I've never seen a fibre SFP with LEDs, and its an open question if Copper SFPs have LEDs. So you are limited to the MAC LEDs or the media converter LEDs. Another scenario could be a PHY which acts as a media switch, it can have an RJ-45 or an SFP cage, first to get link wins. In such a situation, i would put the LEDs on the front panel, since it would look odd for an empty RJ-45 socket LEDs to blink for SFP activity. So i think we should have the ability to describe all the LEDs in DT and let it decided what gets registered. Andrew