Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4680027rdb; Tue, 12 Dec 2023 06:35:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnCvOWPoqKXL7qkLiusNDh+Cn9Ly9K+BIGkYpM8Xo7o2VeJjXavmBdLzXcsluooSRwg6t/ X-Received: by 2002:a05:6a20:5497:b0:18c:331f:3abe with SMTP id i23-20020a056a20549700b0018c331f3abemr8638620pzk.24.1702391741550; Tue, 12 Dec 2023 06:35:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702391741; cv=none; d=google.com; s=arc-20160816; b=UDbgVQyMc5lUZCo0yFTICwVjeahHj/IMRmY71XLUQ2AFSIiDRH0MmGpvBVLNyKhagh 81SyZrJhpp6HP5VbRRnW75RgwtW8e2n6W6SPI8EWlksxOGHl+C0/ajxe39UfD5m01QxU GhoMj58h2TdW7qPnbkv6Pr0FpNo0wN3P9bjQrY+u7Fv0fjQpm3+84tW9G+HCOQlhKj4I BKU5EDoek3AVL5KKQuhUK8e6CHCjKVrjZ06dK5GofScrgae1WLZMY9tr4LwTNmcK8/UL DdnrN/wMCD3utyvSqgXH+JaVRQ90aFrf3QT/80SWGmKNm1ILxDqgkPtF9EEnCGygFD0B y6kA== 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=GBWTn8LXNbd78TZRhT4dRoIz0TuUjj3QIG9fJVpBvLQ=; fh=DXjnMNqJTDPlfH/OlBlK0LiZSP4pF+jWPXu73qxwQec=; b=DoYbFsprn3p5nPK8pMcOjWj/3MOGxIp6RpkGbQ8j4C3Bs6DL7Zx6hJ7jpE9XW3+ISJ 7I1HKNpQR96hNbmey0HbV2cF27rD3OOO9f0tWHscN0kvINZc/svshLKRvB3TRiq/KykJ syXZUY24sLdJ4hfuhWFWFIA9RsVu2VYn0RpXIIsaFU2E7vPnWaJsnMXumuEqzgu/2vcB 2txDFCXR9qeZmkPaOAr9NrRdPEAb1WeXy4HRizAAleuyscIqoRyIDIC9nBS44/KV6ObT M+YoQMC78IPTd+uGysyMwAvktAhqbAdlkZoGTAtFokbCGIgBbHykrgOrt8RfiNrN3zER s6vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=MyvQn4Bc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f15-20020a65628f000000b005c666769668si7916387pgv.200.2023.12.12.06.35.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 06:35:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=MyvQn4Bc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 7B12F80A311F; Tue, 12 Dec 2023 06:35:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376831AbjLLOfL (ORCPT + 99 others); Tue, 12 Dec 2023 09:35:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376824AbjLLOfK (ORCPT ); Tue, 12 Dec 2023 09:35:10 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14711D2; Tue, 12 Dec 2023 06:35:15 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 671FA40002; Tue, 12 Dec 2023 14:35:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702391714; 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=GBWTn8LXNbd78TZRhT4dRoIz0TuUjj3QIG9fJVpBvLQ=; b=MyvQn4BcB78oeufQV//qG/iisqZ/a2BIX2ud8BCiSvDCB2Ur0EiMEc2r7w77Ey1f/9iUHx YiZjcUMMRzbK9mEs/ATZi1Qa4IWoCOhZYXTUrtKEOWfcQ6vc69A/rxuYm0RTiqssOdTX3b rhjn/VC62FSfyRbhBT7Q08Xh4yd96Qvw+zjWmsGKiiHErJrHN5QiGeHQW6hFAonCJUK8qw J0hnCZosfWP3JlwtUE1GrLTxm+GnpnQhreZqM5tYP5KXFidFsaqi88aKvfwXfgxpPfCd3j P5jW/fltdTN8oKhB4VuzsSyQEQ8q4sn7HbAjFFrsdZEhUa7BJypfQvxNVVATKQ== Date: Tue, 12 Dec 2023 15:35:12 +0100 From: Maxime Chevallier To: Daniel Golle Cc: Andrew Lunn , 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: <20231212153512.67a7a35b@device.home> In-Reply-To: <102a9dce38bdf00215735d04cd4704458273ad9c.1702339354.git.daniel@makrotopia.org> References: <102a9dce38bdf00215735d04cd4704458273ad9c.1702339354.git.daniel@makrotopia.org> 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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 12 Dec 2023 06:35:28 -0800 (PST) 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). 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 :( Maxime