Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5211743rdb; Wed, 13 Dec 2023 02:06:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+jD04qF0PVD7fVdKmPdPqbiDxwgnkfv0QTV0eNNyj5tFMSNkI+C6af9smWfHiHla89K2A X-Received: by 2002:a05:6a00:140a:b0:6ce:2731:c249 with SMTP id l10-20020a056a00140a00b006ce2731c249mr3731693pfu.56.1702462000038; Wed, 13 Dec 2023 02:06:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702462000; cv=none; d=google.com; s=arc-20160816; b=sygG+3yfmLwW915xV/S+gUuGIl1/Whg0qIG0dEBFZNHDkBIsE+d5Xod23Q2iaNibrk al2jfODWjQs+GVv7rBphb4ASM55tNveAVa3sNhwpKYh6B6gov86+3nrPtnYBT9s6UB24 5RyARRynRCAkprlvnwwqNAFvdnXX7vSMTFuNHLks+F1EvOzEvxwmLs9U76O7T72PB669 19OHPmoRny88QABPS2zMob+y46XQwwqRKx9s1Arx5zoWthZxq8HyDEqIEBjX1mIguiVg kU9uwKz/wek/kQ2QsJ0Wm/KO1mCif9J2UPB36QiSR/YjrePTGIcvgixQsXQuEzvZri5D Tqjw== 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=4Vs/12xGUPJSfdWRakvw+41gON0/vxkSbuDwoub7QLg=; fh=4KeLVhblYeXg3cd2ys7KCsRZPSZvNbWJaJYQu3AFC3g=; b=vgSshdj5mB7HMpJ6HUb5BCIlE/ezsKnfsqkWIgDdQ8PZMvQrBmRBUTnajbvV/JRKTL glFN6kK/seat3+y/dJqDCd5C3sizzMDlDk9YqyOJEhJugvA9cj45yoV2nlVB7wsf55eA 2iGmmXxo/WqNdUn1GxPNS8kj1pIl2MrCCQCeAX26kr0X6ihP0FC0NpGZG8DenwR9JtUX sUjRiDYAK0HMi6WBM1LmcATD51XQ0Nbaq4Q9QSL3IXCt9ZDdV16zP9YGPUAJ07ISXevC cdQWcab5XLN4bO9IUGjgHW6xq09BBugUlqsTPwEX72t7oY8fdy1EqxJzthP9B3OBKW9M 7emw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="ZOxkW6T/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id ck15-20020a056a02090f00b005c67998b794si9613409pgb.398.2023.12.13.02.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 02:06:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="ZOxkW6T/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 357F88131C10; Wed, 13 Dec 2023 02:06:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235245AbjLMKGW (ORCPT + 99 others); Wed, 13 Dec 2023 05:06:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235253AbjLMKGU (ORCPT ); Wed, 13 Dec 2023 05:06:20 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35EDDA7; Wed, 13 Dec 2023 02:06:26 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C9EFC1C0007; Wed, 13 Dec 2023 10:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702461985; 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=4Vs/12xGUPJSfdWRakvw+41gON0/vxkSbuDwoub7QLg=; b=ZOxkW6T/ELZrsNiwkrU6xsQkgx1LcKuMCRHv61QxMzNGi0jWd3xgscZOFXvyUe2BTy6sel Bj2sjLZctVjWhC1Oz5MdvSTAj62j/7PZv3CNRjg/qqHalD54Lw9LLBzQGPIgaoj/R2hxTW CyG4NYjlS4W0H4X+0x/NeWIj9WBX9qr8OSyLPgCOCb4seW0G0fm2dwvpe0N/curKpsYiug TByedK/NZGHq5wV4s+UTbRrOs2CqXuAiYs3zO8B1jTk2TzLbPzd4Ye7SU9QuN5a7EmFsUy ivMjRqhfp0Wpu/cvJgH+Q4sDgVJ8uWnC8uRH4mjNjm9sh/+NrGU1Wdu5LIG5eQ== Date: Wed, 13 Dec 2023 11:06:22 +0100 From: Maxime Chevallier To: Andrew Lunn 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: <20231213110622.29f53391@device.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 pete.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 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 02:06:37 -0800 (PST) On Wed, 13 Dec 2023 10:08:25 +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? 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 ? 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 ? Thanks, Maxime