Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1296262rwb; Wed, 16 Nov 2022 15:23:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf63ToZcUhC4tDtGx3pABvdBXN5TPeMFIQYsUlMOi2hMgwHdrVq9ny1vgDWD4RlPx63u2J2Q X-Received: by 2002:a17:906:39c2:b0:7ae:b2e3:ce15 with SMTP id i2-20020a17090639c200b007aeb2e3ce15mr77549eje.136.1668641032389; Wed, 16 Nov 2022 15:23:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668641032; cv=none; d=google.com; s=arc-20160816; b=BVHl/DPOYRl/cu28jQCUih9ka1DTM8mKZSGIY+cTTft61RFr4xPuSudXCRmQGeA8T2 KNK076DRoxHKbH5ZkbEIz1HICfmqW1zr717lL5eny0NRZvmL4wONLqHGTwCbfNBXNOb6 RhIjj5WzX94kWs4MFtd6Zdw2uDjUMrJ5pvdsC87JZjGq0VGALrNcmvVeTipakQXphVcr N7dxjt34qewnzMTwd9aDdWyIoveHAQbGfaBikVFGIrad41h8scwzjOhl5siPvCOS5CWG soOzJa1P+EUFFWQFj1N9jAnzDhvNWMxfj45jHZVQky/PX5E9BwUQ/TA63KRAdebNM/9m Y2BQ== 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=xBSjiRyxfBgpC+4coyx64i4+la4BUc7qqiQDRQlV/Ew=; b=zhcbQK3Z+R17L0Xy0Tzj6qECLAaArMAqaIsWxjjAAwlhA/KSV/Nt09gWeWwPgWPWc2 ysQyNXjBBhqR8+UpvMqycSWNWhXvLOgU3HNTr/ozV1X3s9U+1cd1VKpMPiB9z60Wrrmt T51P/kuFDSOwbJ1MLLUE9IqaxTEdEDR8/xAbsBSSPZBsY7CDpV/Gxvfj3t63R23WBgNm 8Os97CxTOXouqAxC6jQCBR9DMdj1bAvVRGK6jojoOjG6a75FfgW00Hs0d0ffKNMAZMVK LXgKPA+kDoTDq3o9OkAIVEwpagNOQlbgsXCZ5/CVFT2HsSKam35/rAap2rAA4ISb9sjt OWSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vo2WlpWi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a056402525600b0045d4f995ac0si16021771edd.588.2022.11.16.15.23.29; Wed, 16 Nov 2022 15:23:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vo2WlpWi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234025AbiKPXUh (ORCPT + 92 others); Wed, 16 Nov 2022 18:20:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiKPXUg (ORCPT ); Wed, 16 Nov 2022 18:20:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77E7F623A4; Wed, 16 Nov 2022 15:20:35 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 13ED86201F; Wed, 16 Nov 2022 23:20:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62AFEC433C1; Wed, 16 Nov 2022 23:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668640834; bh=o+VByynSeoTOtbxxqGW88pHtPLAYkDbDYL2ejaugK5s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vo2WlpWiBNqo6NvDjaOMy0R26oBiKme/8b7U3aRpZZpWjfevhHiqcJaRWhs8YAvVX gPos+QeomRrfbc37iBHqNvzviu7HnGy15a87mJJzQ/hEdyDTSnL9UKfLBSsBhzNhdh EB9yFOoN0IGAuRAdU5U6AHbkGS2YpY0YNronMcPmFHWRbBU8F885Eu97PvXG4YDvty jZLT5dWxqUz8Ubuahc9Naujw605R00a6TLHOjS0LSZPQWcRSuX8lbk0WQGyuYl+kjb KJg8p/+hDhwea0YbPkpnvjg2NPigbVvm3gMfg8Ap1aWMlKu1hM5ZorZnVemkdSgSyW rTBSxHy3rBwlA== Date: Wed, 16 Nov 2022 15:20:33 -0800 From: Saeed Mahameed To: Vincent MAILHOL Cc: Marc Kleine-Budde , linux-can@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, Andrew Lunn Subject: Re: [PATCH v3 2/3] can: etas_es58x: export firmware, bootloader and hardware versions in sysfs Message-ID: References: <20221104073659.414147-1-mailhol.vincent@wanadoo.fr> <20221113040108.68249-1-mailhol.vincent@wanadoo.fr> <20221113040108.68249-3-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16 Nov 09:36, Vincent MAILHOL wrote: >On Wed. 16 Nov. 2022 at 07:50, Saeed Mahameed wrote: >> On 13 Nov 13:01, Vincent Mailhol wrote: >> >ES58x devices report below information in their usb product info >> >string: >> > >> > * the firmware version >> > * the bootloader version >> > * the hardware revision >> > >> >Parse this string, store the results in struct es58x_dev and create >> >three new sysfs entries. >> > >> >> will this be the /sys/class/net/XXX sysfs ? > >I am dropping the idea of using sysfs and I am now considering using >devlink following Andrew's message: >https://lore.kernel.org/linux-can/Y3Ef4K5lbilY3EQT@lunn.ch/ > +1 >> We try to avoid adding device specific entries in there, >> >> Couldn't you just squeeze the firmware and hw version into the >> ethtool->drvinfo->fw_version >> >> something like: >> fw_version: %3u.%3u.%3u (%c.%3u.%3u) > >This looks like a hack. There is no way for the end user to know, just >from the ethtool output, what these in brackets values would mean. it's not, there is no well defined format for what to put in the version, as long as it clearly describes what FW is currently running. at the end of the day, it's just a text you copy&paste when you contact customer support. > >> and bootloader into ethtool->drvinfo->erom_version: >> * @erom_version: Expansion ROM version string; may be an empty string > >Same. I considered doing this in the early draft of this series and >dropped the idea because an expansion ROM and a boot loader are two >things different. > >I will continue to study devlink and only use the drvinfo only for the >firmware version. > 100% devlink is a great options.