Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5786365rwb; Mon, 14 Nov 2022 09:23:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf636csoXUITvIa3ge9QO17wiiRSeUT/9tXjAPIl7xONZTi+N43iKgdFa/aQo537HD7n4LSG X-Received: by 2002:a17:903:1109:b0:176:d217:7e68 with SMTP id n9-20020a170903110900b00176d2177e68mr271737plh.63.1668446632914; Mon, 14 Nov 2022 09:23:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668446632; cv=none; d=google.com; s=arc-20160816; b=kwcUqjrV7BwJXj48Ri5XASDpAsrF1ZQu3UA5UDksp8DF0g3L1ZaYkMEuvKXuJsBXoV qrpEYAmG/GfAItj9kNpOTbX9+bYitqP+swIQYybgeEU8dwn2k2zZuRJV3VoGUDJxrv74 XvD8gQ3fBXj9DGgEgbOsTiQd0pgbs4SNEF/p3/9HYBbKxRuj3WH2YPAHkt1uzYj+kRwD rMaUUAZ+EIZbO7k4hukAsh4IjwQX2WytTwejub/r0HGwDHSEKZToIIe+BgXnLYUUZ7GH 4r1adcXwSoKrWCB2ZMeEFEb68ttC2DqdmKsktdLDqiANFFuPY8FJNF5TQs++nIgITi6p 0NOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=8mzxDj+mA+La36bwra6nbOYkYl8KiO9soSvMTuQsXDE=; b=cIPh3HHTVs+6G4545GAbnxBYQhqCGGboi3RMVBZK8+43t/S+WeBMcnPtrY3pE9pzNJ dO8CU7w2RjUTYHg2/EZzB8Ai4xeXgbhN5rZAqXJ+Dfwq22YNDzmeFWn84/PFu1v3b6rt J20MzNYrU4pY8zDW+mQLQvNrzY68O/yvsgMJ5uSIW8kVzKv8zABIhKzvbIJPyA7yvZUw fM9N6pfIrTcszn2emdnzgx8Z89soDwRTLw2fMQ/l3LwKL8nHWFPLJw5T53t3db+6EmlP N6bzaQO6JI7DfAH61L0qU9HOfptT56Ln8CioHe/C9c/rIltwQ6Msdje+G8uTWGj6ho0u 96pQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j185-20020a638bc2000000b004750a0650b6si8132749pge.525.2022.11.14.09.23.40; Mon, 14 Nov 2022 09: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237271AbiKNQur (ORCPT + 87 others); Mon, 14 Nov 2022 11:50:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238030AbiKNQu1 (ORCPT ); Mon, 14 Nov 2022 11:50:27 -0500 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD3452F67D; Mon, 14 Nov 2022 08:49:16 -0800 (PST) Received: by mail-pj1-f41.google.com with SMTP id d13-20020a17090a3b0d00b00213519dfe4aso11237018pjc.2; Mon, 14 Nov 2022 08:49:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8mzxDj+mA+La36bwra6nbOYkYl8KiO9soSvMTuQsXDE=; b=lju5IcZYyZjggJDhNyl3d1E4q2R3IZEvxlcaW4t7teeIq8uwwew3cqQeIV4MfR1/6l Fk+TqvFprS1lVwnf1ps19/jCAi4phUkk9YQbq6M2XFPeEKh3B2yEYv9Ug94bt9cCmSQh 1knT5qB49FgvjdHGj1wgGPzDKn1no1ZFD17wPpq96gH4kGEKOBeR5yDC9wDmkVCo/yYH wipbpQKQihg6NnwbOryzMmTJLqu8wK0tMziOmIBxUKMrqASYul0MsXNxSqRiZ2RAnXcu ewDPCWT46bngOEO33YMWuv33StI178OFf7up4JM1/NZ90qQgOZrrwiAYUZi5xpnv/V9u RxaA== X-Gm-Message-State: ANoB5pnuPsbkD5m0QYaZtJXVgCs0z3cOgq9HsvH2LHJ5TU8JRzloGIYG hYO4r5N2LVma+f4Fr4qC6BJITHaSSVA/d8o4/0BL6Gi8mnI= X-Received: by 2002:a17:902:ed41:b0:175:105a:3087 with SMTP id y1-20020a170902ed4100b00175105a3087mr141889plb.65.1668444556100; Mon, 14 Nov 2022 08:49:16 -0800 (PST) MIME-Version: 1.0 References: <20221104073659.414147-1-mailhol.vincent@wanadoo.fr> <20221113040108.68249-1-mailhol.vincent@wanadoo.fr> In-Reply-To: From: Vincent MAILHOL Date: Tue, 15 Nov 2022 01:49:04 +0900 Message-ID: Subject: Re: [PATCH v3 0/3] can: etas_es58x: report firmware, bootloader and hardware version To: Andrew Lunn 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no 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 Mon. 14 Nov. 2022 at 02:03, Andrew Lunn wrote: > On Sun, Nov 13, 2022 at 01:01:05PM +0900, Vincent Mailhol wrote: > > The goal of this series is to report the firmware version, the > > bootloader version and the hardware revision of ETAS ES58x > > devices. > > > > These are already reported in the kernel log but this isn't best > > practise. Remove the kernel log and instead export all these in > > sysfs. In addition, the firmware version is also reported through > > ethtool. > > Sorry to only comment on version 3, rather than version 1. I don't > normally look at CAN patches. Actually, I only started to CC linux-usb mailing from version 2. Regardless, thanks a lot, this is a valuable feedback. > Have you considered using devlink? > > https://www.kernel.org/doc/html/latest/networking/devlink/devlink-info.html I have not thought about this (I simply did not know the existence of this feature). A first quick look makes me think it is a good idea. I will continue to investigate. > fw and asic.id would cover two of your properties. Maybe talk to Jiri > about the bootloader. It might make sense to add it is a new common > property, or to use a custom property. I will try to report the firmware version and the hardware version in a first step and then see what we can do for the bootloader. > devlink has the advantage of being a well defined, standardised API, > rather than just random, per device sys files. ACK. > There might also be other interesting features in devlink, once you > have basic support. Many Ethernet switch drivers use devlink regions > to dump all the registers, for example. I am aware of ethtool_drvinfo (which I implemented in the last patch of this series to report the firmware version). Do you have any reference of how to dump the other registers? > Since there is a bootloader, i > assume the firmware is upgradeable? devlink supports that. True, it is upgradeable, however, I do not have an environment to test for upgrades so there are no plans right now to develop an upgrade feature. Yours sincerely, Vincent Mailhol