Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5187546rdb; Wed, 13 Dec 2023 01:08:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHymxhS4Dsovp5T/P/R2iOPkmQkbYxwXJADgCimh+9e9HuzIQYaAsONcrxOuwd5R5+c0o0j X-Received: by 2002:a05:6808:eca:b0:3b8:b063:9b70 with SMTP id q10-20020a0568080eca00b003b8b0639b70mr8620904oiv.98.1702458535848; Wed, 13 Dec 2023 01:08:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702458535; cv=none; d=google.com; s=arc-20160816; b=VDn6TI8FdRIDIF42IIph3ozla4cRkA98lF6r6gnT0Y5lzcd7gU9UIVrPpD0JoPpY21 2S1BAJCf6eZWsZe+fBbAkCbKMONkkTn3L82De7/zmAp7bz35Xe4nt18QFJM3FnYaLtUG klNtiqMJvsJP7vGrUFnP+a8B3UK5qSiXXmHy0QZ0//X3TXbeF5YrMZwF1PrRW/f+gd4l bLcrz1ONw/7rXcS3ecQUTk++C7puVIzJWWVXABQVNEtBF95SbXe889HXQJpGlkvkoCkt cv6fIAlGc1ggck6vGo5f9BAVM7jXBRfwF781dGZQaSro0nq2yqFVdTyTMdWzYeF/7hyl 9jjQ== 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=5fdPmGKzNE61LFZ6qQg7uwhhdfvIan9bvjKNoWS3W08=; fh=J+EBaUpMscnC5m+SvRL4eszM3f2LwHoI7TfHaZHiEZ4=; b=IovH/XW7VbcV2j4We/PhgQjX0MLDg1O4oCcFldK5TQjDye00PxXXJXyUHkY7Sm1Udk r2nJ9wNhcaLONREQfBxLXYbrkTGF89o5D4LvnE4XwdlZrHfrhybq3BqzgSc0DDcxT59B CVEY0kdijg/oVYRGdi4cQTA8OX2QPpgksx01jw9dfwGXCqSwTwVXGTO/UfmPo71DI57h BEGuboJ3ewW957LwBkfAQ9C9/qHJ4hhAnQI8Iu4ITVIe5A8qM6V8DA+SdNms/lex6BPF xlvohocyHLjhWAF0fwIoum7vCTkeJIvYoEC01s2I4UFSXnSSF1ML8Sb6IJqY/pPvyvaY EBwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vlYZxVWK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id b21-20020a056a000a9500b0068e256c6366si9083180pfl.352.2023.12.13.01.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 01:08:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vlYZxVWK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 698A3805E2FF; Wed, 13 Dec 2023 01:08:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229531AbjLMJIi (ORCPT + 99 others); Wed, 13 Dec 2023 04:08:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjLMJIh (ORCPT ); Wed, 13 Dec 2023 04:08:37 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42378AD; Wed, 13 Dec 2023 01:08:43 -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=5fdPmGKzNE61LFZ6qQg7uwhhdfvIan9bvjKNoWS3W08=; b=vlYZxVWK/QG28Ej/BxtNFG3u45 qczHktyj23C6zNtVb/yG3OEu2eUyY7sBHs+k0tUgpymPcRP96TxSQtgndZNWxiNuQSmOy986Ngv4X XLSNx3yB76nkc49t4GfSJCW6PB3gXmxs6RK/ujn0kyWTw3H9Xxbgsb1kZ7Rc5K70Pc7k=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rDLE9-002new-76; Wed, 13 Dec 2023 10:08:25 +0100 Date: Wed, 13 Dec 2023 10:08:25 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231212153512.67a7a35b@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 morse.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 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 01:08:53 -0800 (PST) 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? > So I think it would be wiser to avoid the deadlock with a proper > analysis of what the locking scheme does. Maybe Andrew or Russell > have a better vision of what's going-on here, I tried to dive into > it but it doesn't look straightfoward to me :( I agree we should at least look at the deadlock, and see if we can rearrange the locks to avoid it, even if there are no SFPs with LEDs. Andrew