Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp3207590rwl; Sat, 5 Nov 2022 19:18:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM63w4OC4FuLdhye+S1lt7rA/OaXvf3+tOLjC0tea10AnKUS4w9rMHWFSOdRKOyqX4lElXF8 X-Received: by 2002:a63:e218:0:b0:448:5163:478f with SMTP id q24-20020a63e218000000b004485163478fmr37723849pgh.415.1667701099175; Sat, 05 Nov 2022 19:18:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667701099; cv=none; d=google.com; s=arc-20160816; b=ns1SvZYkDPNRrGpTv6aL38M11sUjolu5VSGeEmKsdXL6zaVcP57wbVpdvwuMmr5KqW fdz3iHJ7M1tjJyFio6yv2HWVm5ft5tBqsHbC74FZiPgvh9ym2mAHpk5ibVfy8FPxP+qM QEyN5nyzp/5BZRAvp8x49OE7CG1wyqZHbHtlKKff7GfKpSZvxylEaPn4Kmzsjm3fDCS2 Pz62sf30w7zWDCMvQhTbOp5itcSGwIJn3x88JfdxQ/jtotwRsyI/ObLNLXj3BU0FG2Di cbMvkRmvv8KmzDRGBOpsxBB3qNqbU8yGM1loxjobWW4Kk7pU8U7dxusX8f4WYFfUHp8U UBEQ== 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; bh=JQy+cgcLoTY8r7S09ZwVYy3CW8AJ2kUjkAzDdJMTXYg=; b=nuiZAhWN4f+wV5LyrtOxKmW4nwN/IIx/feHiNFfUyRUVgtoOdn70jcn5yqdjBqXIns CWXxGXjNv+m5V0cdsSv4SCvMiqOQGRhdooMT00tahipXrst1yJdpW6VA6vyyAI3f1wLU jzXAGbBRkWxkcow5RWwC2vLERj8raa3QNaR+nEKCWaRY+vnQM8+YrtDX5f6CWQyyuErg XfFWrFAm4ChJE7anljR/F6U3D57MZHg/hF3GPyr4JkrA85Pi50cF/7PESdaDJcRf/Ugt d+/jq3xL6d3BM5VMcmai/0yvrEjuBBFZjDDaFqp1xgrnSh/OfcozwVgN1tsExIKDov0q 14dw== 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 d2-20020a17090a02c200b00202880e0827si8289074pjd.28.2022.11.05.19.18.07; Sat, 05 Nov 2022 19:18:19 -0700 (PDT) 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 S229560AbiKFApO (ORCPT + 96 others); Sat, 5 Nov 2022 20:45:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbiKFApN (ORCPT ); Sat, 5 Nov 2022 20:45:13 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id EB99611459 for ; Sat, 5 Nov 2022 17:45:11 -0700 (PDT) Received: (qmail 394112 invoked by uid 1000); 5 Nov 2022 20:45:10 -0400 Date: Sat, 5 Nov 2022 20:45:10 -0400 From: Alan Stern To: Greg Kroah-Hartman Cc: Vincent MAILHOL , linux-can@vger.kernel.org, Marc Kleine-Budde , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v2 3/3] can: etas_es58x: report the firmware version through ethtool Message-ID: References: <20221104073659.414147-1-mailhol.vincent@wanadoo.fr> <20221104171604.24052-1-mailhol.vincent@wanadoo.fr> <20221104171604.24052-4-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,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 Sat, Nov 05, 2022 at 06:38:35PM +0100, Greg Kroah-Hartman wrote: > On Sun, Nov 06, 2022 at 02:21:11AM +0900, Vincent MAILHOL wrote: > > On Sat. 5 Nov. 2022 at 18:27, Vincent MAILHOL > > wrote: > > > On Sat. 5 Nov. 2022 at 17:36, Greg Kroah-Hartman > > > wrote: > It's late right now, and I can't remember the whole USB spec, but I > think the device provides a list of the string ids that are valid for > it. If so, we can add that to sysfs for any USB device out there, no > matter the string descriptor number. No, there is no such list. > If not, maybe we can just iterate the 255 values and populate sysfs > files if they are present? I'll dig up the USB spec tomorrow... Yes, we could do that. But the filename would have to be the string id, which is not meaningful. We wouldn't be able to have labels like "product-info" unless somehow a driver could provide the label. Also, there's the matter of language. Devices can have string descriptors in multiple languages; which one should we show in sysfs? All of them? Right now we use just the default language for the strings that we put in sysfs. > I say do this at the USB core level, that way it works for any USB > device, and you don't have a device-specific sysfs file and custom > userspace code just for this. This is unavoidable to some extent. Without device-specific information or userspace code, there is no way to know which string descriptor contains the data you want. Alan Stern > Sound reasonable? > > greg k-h