Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5460929rdb; Wed, 13 Dec 2023 09:13:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKvM0EkX/pHo+p1lO++Qfgs63FgM7OoWEc3j3fFgwvqlKsoBLp+LaVITSKQ9BRfc1VbBxR X-Received: by 2002:a05:6a20:3d1c:b0:190:c99:cfb8 with SMTP id y28-20020a056a203d1c00b001900c99cfb8mr11097325pzi.81.1702487588616; Wed, 13 Dec 2023 09:13:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702487588; cv=none; d=google.com; s=arc-20160816; b=POqTt5n0MpjjKYu2qqWBjW0VIKT4RLJX/mejU06/gyy5NL2SWLjTDdYkyWspjUhpFU ooBxz+Zx+0MZDLhN4wE7tVDFT8qVfo8WoE1PUoRgddvfCOCsGFh1jBOEFyAO77f4pmz6 92QBiKLY14/NvAMEUXcb0AOU3ApYC20uRe77bbiKeTtJPvaoTwIs+a1B1iyr4dONyriO dMPYSwAWAJQdkO3C7NjVCvuYO6zGbcVBhoWLhEDTnMbU/wCceu03nUXqJcVnyknIfEd+ Bb9X4eyrd0ywZfNgFVPCFWgEKktHL3lsZ8etUwDvIy+c7/pZxragfjd10RXQQBQxmqp/ 29Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=Y5TlHmWEUPrLvS1FVi0orOnaoJ8WBQaxRvgSpwfpfbE=; fh=VCvatLjP73B3SxGztZD+0fahyFIRpb7dTYk2RME6I0Q=; b=DI4MuERYRjz3Nm4exSEZZHzyNVV9nLdUY5NwFfyuNKarRQE6ntczoM0pE/bScWqpv9 MSGtlX3W+j/5h6jouw2q7NhUOJ2THwgLsUaowrb4OPDLQ+tWMtwapq9P4moRRS3qfGxc 70rcaRRmk7jujmF9X0VAB6nxkAEQXTih/fbu1EC6gh0usFnA9OfSRknsR8U5xSfZe26F voY4I0YUeYDtgup+CZWWEVyGyZTzLAq3Y6C9Smvre50l1jdB6Cooj0n5KD8modRHcaRr rZXDlw+Obl4ihBpRnrV7YULDEgVNyJrrVnKeHJQBsJtSUVs2osTHCAtd2LrLNArnpKsN ej5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Lhf3Nu8+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c31-20020a631c5f000000b0058556a636dbsi9522984pgm.434.2023.12.13.09.13.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 09:13:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Lhf3Nu8+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 6F61380BE86C; Wed, 13 Dec 2023 09:13:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231744AbjLMRMp (ORCPT + 99 others); Wed, 13 Dec 2023 12:12:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjLMRMp (ORCPT ); Wed, 13 Dec 2023 12:12:45 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D759C9; Wed, 13 Dec 2023 09:12:51 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id EBFDBE0003; Wed, 13 Dec 2023 17:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702487569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y5TlHmWEUPrLvS1FVi0orOnaoJ8WBQaxRvgSpwfpfbE=; b=Lhf3Nu8+GyNG3qgU43seuI/4CVmSA5PeGwqa1jMFEbOrcCXwsFnlKeBN8+OL9LJ100v/i9 s6PWl1NWck+TkngarDqAkX7KQhn/C5kgpcviDmN9v4DoF8ZIJAx0FiCzeGqI+oL8tk/t/W iIGq+MuAZqjkfEFXhVl0KzJs6+Dbxr/jrtfGV+P+o55kyhhIZE4Dc4jlNag819/GuOEKzP JXHH/7KmfsbJPpPG5U6/OyLIsQMYrc/EBlay4BQ30kUH8h+3lO5XJzSwn0E1lBUNe93pXC 44y0wKlB5e2vIPAYTkKRhaP0INVRgM505IfJdC8OnVuZWi1NO1fSYLGWwHnzBA== Date: Wed, 13 Dec 2023 18:12:41 +0100 From: Maxime Chevallier To: "Russell King (Oracle)" Cc: Andrew Lunn , Daniel Golle , Heiner Kallweit , "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: <20231213181241.6a5e8afd@device-28.home> In-Reply-To: References: <102a9dce38bdf00215735d04cd4704458273ad9c.1702339354.git.daniel@makrotopia.org> <20231212153512.67a7a35b@device.home> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com 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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 13 Dec 2023 09:13:05 -0800 (PST) Hi Andrew, Russell, On Wed, 13 Dec 2023 15:27:28 +0000 "Russell King (Oracle)" wrote: > On Wed, Dec 13, 2023 at 10:08:25AM +0100, Andrew Lunn wrote: > > On Tue, Dec 12, 2023 at 03:35:12PM +0100, Maxime Chevallier wrote: > > > Hi Daniel > > > > > > On Tue, 12 Dec 2023 00:05:35 +0000 > > > Daniel Golle wrote: > > > > > > > Calling led_trigger_register() when attaching a PHY located on an SFP > > > > module potentially (and practically) leads into a deadlock. > > > > Fix this by not calling led_trigger_register() for PHYs localted on SFP > > > > modules as such modules actually never got any LEDs. > > > > > > While I don't have a fix for this issue, I think your justification > > > isn't good. This isn't about having LEDs on the module or not, but > > > rather the PHY triggering LED events for LEDS that can be located > > > somewhere else on the system (like the front pannel of a switch). > > > > 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? > > No, and we should _not_ mess around with the "LED" configuration on > PHYs on SFPs. It's possible that the LED output is wired to the LOS > pin on the module, and messing around with the configuration of that > would be asking for trouble. > > In any case, I thought we didn't drive the LED configuration on PHYs > where the LED configuration isn't described by firmware - and as the > PHY on SFP modules would never be described by firmware, hooking > such a PHY up to the LED framework sounds like a waste of resources > to me. > So it looks to me that the Daniel's patch does make sense then, even without considering the underlying locking issue ? Sorry for my misunderstanding of the LED driving that started this discussion :/ Maxime