Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1814478rdb; Thu, 7 Dec 2023 09:23:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEd0Mf8j5dxjDV6FNqH/ZmHRjZlAsCVOM4EAdqo1ksYigJt3t+ERI7jb6SHSyoEkQkbXICT X-Received: by 2002:a17:902:db0d:b0:1d1:cbbf:8ede with SMTP id m13-20020a170902db0d00b001d1cbbf8edemr2386162plx.84.1701969786606; Thu, 07 Dec 2023 09:23:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701969786; cv=none; d=google.com; s=arc-20160816; b=za4OGVQzT+XQb7FJ3ZFa1hbObQFhl6cs+aWomlA1qZc2QTmY93odH3qRsMmBtLBzec 7/ssFp3o3Ymk1ekjfvR66/8qjPXMto/XgVKB4KkgTNquEyFKpKeI1yklxa7Ysk3EYRdJ rtfL4Ze1cr0xfegBD+NOmGBj2TJ6EO1ftT+teidKBf9ks2TfjdnUTSZqUthe9KtpmYqB T2AVB5lBmKb3RKCQWWHVaDh3kHCSvdyK/EhfHo0VdPHaQ/efYpmmgY8P4jNExbsIoebv vqPAEFiJPXdonnXogXLaKm/DD/Uy8zQDvOJZxZyU4JBs+f0B4Orxxi9+R2R6HLCzxNRg bd5w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=n8EuSQJyAywlhg2fIhG4fHU8hZtndNfrEnSZSzq2Rks=; fh=ALSQJACmQ/+EJxABKtjErPWcvWFjbeJLLPviO8SFWyk=; b=bCjgUr67Ol4b5xt16KvPT2qvCQaNjApEtYmxILoU8iqCIT/DrXVLu+u2JaXC316ZKG jWZvf27at8HkBl9dq55rduCkyq2xZD/yDqXv+TXNuqYSmE9JJZ91qjUEHZLh3wKc8+kh 1gzOprszf+qWTybyEsBm2ZbDrHnJaoLxAxDebTNAZx3n7y6sQbimAdnxi0vNL4hovF/g /2wsnsgv5k8qMHZRGFXr/PZBs9VNDnE/Jn8R24QJ2OFCYVNEnQdFf6Kr15eccdm/CHO/ sWKEk4pOiF42U4S8VTa2bcIiU9xqwLSbeOAlyomm7rCy+cIPqdExfbwCkccjXmRAlzJ1 C6LQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w21-20020a17090a8a1500b002869248f289si170470pjn.0.2023.12.07.09.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 09:23:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 62A5B81C0C2A; Thu, 7 Dec 2023 09:22:46 -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 S1443331AbjLGRWJ (ORCPT + 99 others); Thu, 7 Dec 2023 12:22:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443303AbjLGRWF (ORCPT ); Thu, 7 Dec 2023 12:22:05 -0500 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EB67FA; Thu, 7 Dec 2023 09:22:12 -0800 (PST) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rBI4Z-00048B-0E; Thu, 07 Dec 2023 17:22:04 +0000 Date: Thu, 7 Dec 2023 17:22:01 +0000 From: Daniel Golle To: Andrew Lunn Cc: Marek =?iso-8859-1?Q?Beh=FAn?= , Lee Jones , Pavel Machek , Jakub Kicinski , Christian Marangi , "David S. Miller" , Li Zetao , linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [PATCH v3 1/2] leds: trigger: netdev: extend speeds up to 10G Message-ID: References: <99e7d3304c6bba7f4863a4a80764a869855f2085.1701143925.git.daniel@makrotopia.org> <20231207172923.62ce530e@dellmb> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=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]); Thu, 07 Dec 2023 09:22:46 -0800 (PST) On Thu, Dec 07, 2023 at 06:11:29PM +0100, Andrew Lunn wrote: > On Thu, Dec 07, 2023 at 05:29:23PM +0100, Marek Beh?n wrote: > > On Tue, 28 Nov 2023 04:00:10 +0000 > > Daniel Golle wrote: > > > > > Add 2.5G, 5G and 10G as available speeds to the netdev LED trigger. > > > > > > Signed-off-by: Daniel Golle > > > Reviewed-by: Andrew Lunn > > > > So what will happen when there are more speeds? Will we create a > > separate file for each speed? > > > > Will we have a separate sysfs file for 10, 100, 1000, 2500, 5000, > > 10000, 20000, 25000, 40000, 50000, 56000, 100000, 200000, 400000, > > 800000 ? Yes, why not? I also doubt we are doing to have 800GBit/s on RJ-45 copper any time soon. And speed-indication is generally only needed for media which supports more than one speed (ie. twisted copper pair). > > > > These are all speeds from include/uapi/linux/ethtool.h. > > > > Maybe we should have reused ethtool link mode bits, or something... > > That gets pretty ugly. The bits are not in any logical order, since > they just get appended onto the end as needed. > > > Also, the files should only be present if the requested speed is > > supported by the net device. So if 2500 mbps is not supported, there > > should no be link_2500. > > Yes, this would be nice. We have the information in the phy_setting > settings[] table in phy-core.c. I agree on that, it would be an additional patch though because that obviously goes beyond adding some more speeds.