Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp213724rdb; Thu, 25 Jan 2024 12:50:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEX2PE2Tvk0t8xV3UjA3ZuAkvJpeofMNdQUEClBd2kgCpCFrbvNjGsLE3YQUjYYsdbXmNVA X-Received: by 2002:a17:906:19db:b0:a31:7aca:a429 with SMTP id h27-20020a17090619db00b00a317acaa429mr87180ejd.4.1706215632994; Thu, 25 Jan 2024 12:47:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706215632; cv=pass; d=google.com; s=arc-20160816; b=NBl5QCGvryJ6SUH8mlDwVHEg3pk0W0pUzQmTpi5XUhBj7pFxNv6ipzEyp86YlNvcGi m7+vBsB0WU3WXMjSg1FLItY2iDgTf6sW/s8M6IsUpFIjqetmWfp9zckbrDYMYGds1QIB njveumY1UBofbpjqycqfoop0Z6neRZaaGVgbD+qx0/N+54m82uRLWf+TOOTSJrYtB/wS HXihU+M+2D1woquU3L7+3LU7NU2eJ/hM0kj6l4Tyy3J6qm8esdbx0mF4mh+LAHm5E4zj jp4EBw6I3AJfKuWN1rQXSA7zij5rQLChjemRDXOB9zDXMO6jOTg6ISf2dethjZZ3FsJN vOfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NjvNmpvcyNjsNydEo+Z2ltkIxVtWxwctxxsjrOVm3aI=; fh=V3fEJLLg9vhZVnvUAN7lTj8VbgMKcm6Vlg2zQVldd5Y=; b=g/o+r5Zv2Cmhrrp9BJcRfSZUiPchAD054OeO6nqJQyZMnHolQ0Y6+Sj0AlFN1d73V/ q9KNa128h7T+LAcSNjv77rng9sIMUO3sAIO7YcpYYFr18HTKXcMBRJ5tgXB9v3f4xTpN Yd4rg/0Mxudh88R2tKMfwvE4bbOUdFlXcJ54L4AJGagEIBmGhSQ/H+Yjq2HH02cPAlTd 0oVBeyFXDaD+xTLPg1xN1HGCzkcn4xmoqabU0IYiQPBnnJV364FKFJSNlW9sxeSqbHYl X2Y7Vik0Yy5mZgIPEQoP2uff8P9FXk/XyBoFp80X+XyuTLdMNIMFhQyc1gZ9RAy+I4bY HrHQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Iu30FEXn; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-39262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39262-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v1-20020a1709060b4100b00a313c8e250asi1254144ejg.500.2024.01.25.12.47.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 12:47:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Iu30FEXn; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-39262-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39262-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D33901F22772 for ; Thu, 25 Jan 2024 20:46:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76EDC1386C4; Thu, 25 Jan 2024 20:45:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="Iu30FEXn" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AA4C131E40; Thu, 25 Jan 2024 20:45:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706215551; cv=none; b=JtWhgIkzla+Tji7tBawXM4hWMljOn460Lc3VZj4Pp7j1vP8WDKQfj8LWqCJ7qJARHDDBuOzTZY7v2HuCWA5Xo3Q0eZS8WCNVjuVoAgFhLfCb33k2XbrEoo+akeElm2E/CNZCZgpU0J4fKjZSgnf/Yc9FH0deYjAtLy8eTvL6wCQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706215551; c=relaxed/simple; bh=MEYtjeW29vfCnD9UeqkFj+lrriB0AqvztxsmzdZxKf8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oJdE1XIOWBEipotMBWzvhuiQ9m/Zlb2mQKETNBKeTGS855uOeMphe/TrrHch9xGi6UsJXZEFy/gPpr5u02GzlYhSJkV6OS2fKo12Yy4lkgKR1qtCkQFt8Amjt6GoEHSsDaUA3aWXDZyle/ueReHTiDSKiPKIrraZ4JHwjawzPxo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=Iu30FEXn; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=NjvNmpvcyNjsNydEo+Z2ltkIxVtWxwctxxsjrOVm3aI=; b=Iu30FEXnJMWAZuuxH3st9SEc0J 05YCNF82thUjrVtBzvkzYVU1IuZKCChHWOB5Qeok3uOZCv7PQ5CQ/s/n5t5j0G74VYzQol8ZZKyGb RUnIMCWFbfjBYch9zGLzaiK+aMJ72YN8j4Z0rfFOr2zW7xcAA33YPLIxKSDMUFqmOWao=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rT6bQ-0067eB-86; Thu, 25 Jan 2024 21:45:36 +0100 Date: Thu, 25 Jan 2024 21:45:36 +0100 From: Andrew Lunn To: Danielle Ratson Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, corbet@lwn.net, linux@armlinux.org.uk, sdf@google.com, kory.maincent@bootlin.com, maxime.chevallier@bootlin.com, vladimir.oltean@nxp.com, przemyslaw.kitszel@intel.com, ahmed.zaki@intel.com, richardcochran@gmail.com, shayagr@amazon.com, paul.greenwalt@intel.com, jiri@resnulli.us, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, mlxsw@nvidia.com, petrm@nvidia.com, idosch@nvidia.com Subject: Re: [RFC PATCH net-next 1/9] ethtool: Add ethtool operation to write to a transceiver module EEPROM Message-ID: <20ab7355-fc72-4dba-b3ea-db2244909bab@lunn.ch> References: <20240122084530.32451-1-danieller@nvidia.com> <20240122084530.32451-2-danieller@nvidia.com> <9eecccb0-a875-4dbc-b88c-5b2aad838305@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9eecccb0-a875-4dbc-b88c-5b2aad838305@lunn.ch> On Thu, Jan 25, 2024 at 09:26:16PM +0100, Andrew Lunn wrote: > On Mon, Jan 22, 2024 at 10:45:22AM +0200, Danielle Ratson wrote: > > From: Ido Schimmel > > > > Ethtool can already retrieve information from a transceiver module > > EEPROM by invoking the ethtool_ops::get_module_eeprom_by_page operation. > > Add a corresponding operation that allows ethtool to write to a > > transceiver module EEPROM. > > > > The purpose of this operation is not to enable arbitrary read / write > > access, but to allow the kernel to write to specific addresses as part > > of transceiver module firmware flashing. In the future, more > > functionality can be implemented on top of these read / write > > operations. > > My memory is dim, but i thought we decided that since the algorithm to > program these modules is defined in the standard, all we need to do is > pass the firmware blob, and have an in kernel implementation of the > algorithm. There is no need to have an arbitrary write blob to module, > which might, or might not be abused in the future. O.K, back after reading more of the patches. If i'm understanding the code correctly, this is never exposed to userspace? Its purely an in kernel API? It would be good to make that clear in the commit message, and document that in the ethtool ops structure. Thanks Andrew