Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp633757imn; Tue, 26 Jul 2022 05:35:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vI8uDxMUa8Du+XnaSNk29uIqO6cOpuYL4i5Qiww5VnEBacxhjHZgYzfjIfNBhgsHV/JYA4 X-Received: by 2002:a17:907:75f9:b0:72b:1438:474d with SMTP id jz25-20020a17090775f900b0072b1438474dmr13845768ejc.738.1658838916410; Tue, 26 Jul 2022 05:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658838916; cv=none; d=google.com; s=arc-20160816; b=hvtGha3AVhVzDH6MW5/ZOOGKEM2XKYl7b/WvbhecK4v0P7btLWMMtT4KZAQe8MkNYZ WsXKTOpE8s2TTQM1pkqji/4fMVduWIfKLkDtn0I/D2UMPeiKQ+Ywo6K2sGYYJQ3pRR2f qB6SJq6X2m8KFORr7MZr8HIaKfRm8rtDWQy/gCHNMy7jle2o5anJwjhGrOTUfRskwn9F c4w2CmCDCddHsEGZNZ1CLiyuH/tgsIEifXx/6JM5gpSi2+rNNA5JNih8s9ZcV19l6RQ9 MhkTLoO09YT1epVe6opsZklyHlRfXTsuDR/s9NSPhnyMsPmwu4y09PwZhs6PX9MqJI5Y Iz3Q== 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:dkim-signature; bh=JSI3fstLoaSfTHtz4CWJBKNvtmx7kMrfr48Gh9Ol0TQ=; b=vWvlbI61cvTzokjt4RHh+HoEpyo447HZ7stxxa1u+nFaXqlwAGjyOXYr9MctqpOEHT kHSVjQRxWTJXMkm2TQn9m9nJFp/QGAUoZOnqIvPP8ufcvkQOcsAyMay0BZ+wu19l3ay1 GTbqKF+/3UV5EvbBAya6r/pEFZziQTo3XCl6TRtC47Vn3qHpw9uCorInW8Ifsh9pQU7A IsLWT7+PJNHNUcQg07HxZ6SG95T40fWenitsnkv02BK4VFOnTRnEGwZuZNJXmnqXok2a 4uG2wPajB6wZOvGguR5vcR86mVTIWeg2dV7+TfaBRbj73hciv/3Oa/JPnvti4mfI0Yo6 WAYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TsFmCxgm; 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=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020aa7da82000000b0043a84d5e5eesi14044095eds.393.2022.07.26.05.34.51; Tue, 26 Jul 2022 05:35:16 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=TsFmCxgm; 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=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239047AbiGZMO1 (ORCPT + 99 others); Tue, 26 Jul 2022 08:14:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233025AbiGZMO0 (ORCPT ); Tue, 26 Jul 2022 08:14:26 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF4B32F386 for ; Tue, 26 Jul 2022 05:14:24 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id a23so19990244lfm.10 for ; Tue, 26 Jul 2022 05:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JSI3fstLoaSfTHtz4CWJBKNvtmx7kMrfr48Gh9Ol0TQ=; b=TsFmCxgmvQsod+IwsLbWbfb1opLHnzXLtlD3ojDopwudHQF35HTFuSQ8tXiUK+utAk H4Sxf89oATVd7Yufd3uHAqXJUqWK8jp5f9eLo0lTKylDHw8yJo0Kjb0E1EAql0AVZ8S0 ZYPE9dkdjxYsuLgiVmyJNdIdCDXY986c+5uW0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JSI3fstLoaSfTHtz4CWJBKNvtmx7kMrfr48Gh9Ol0TQ=; b=ohom9dU9PIR0IsctwZZk6h8EnzN/hbrGVnmWaJLnw8mRI9jThai1iZ4+yHFgrLyE1D PfalNF7tETPzo+Eucckc+k1mCV6vnnC1/QAwrC+um26kiCBRIyr0dZ/N3h5xG8b/IyPE u42Kxf9GBkEQSDad8z1rGFU40U+CfM3GcSfFN0QSrFPoLB4WCB/7whCKrLyofDPymaz9 c0JhnDZqGGJDKKG03/IsirNOaC1VuWnRj4nvCtArnwsTHF/JGLFv0aP6Cy+3irtL7Nw/ eR3iQGSfUQ6qwORGK5LzPCm1H+HASlpbex0BLLRmjDmjQQt6PvK3pr7us6FFLt5f3q3Y KoAg== X-Gm-Message-State: AJIora8E2591qk7KMLoWNOil4v4LDANLQTpsty8vDW2Uv8br13oPn/Tg yRYTPF+3UhaRqK2w6wHHeWFFiGd9ip9kgld9k56RHg== X-Received: by 2002:a05:6512:3503:b0:48a:6060:5ebb with SMTP id h3-20020a056512350300b0048a60605ebbmr5902220lfs.429.1658837663080; Tue, 26 Jul 2022 05:14:23 -0700 (PDT) MIME-Version: 1.0 References: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> <20220725132514.h3iva4xi4sdncus6@pengutronix.de> In-Reply-To: <20220725132514.h3iva4xi4sdncus6@pengutronix.de> From: Dario Binacchi Date: Tue, 26 Jul 2022 14:14:12 +0200 Message-ID: Subject: Re: [PATCH v2 0/6] can: slcan: extend supported features (step 2) To: Marc Kleine-Budde Cc: linux-kernel@vger.kernel.org, michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Oliver Hartkopp , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Hello Marc, On Mon, Jul 25, 2022 at 3:25 PM Marc Kleine-Budde wrote: > > On 25.07.2022 08:54:13, Dario Binacchi wrote: > > With this series I try to finish the task, started with the series [1], > > of completely removing the dependency of the slcan driver from the > > userspace slcand/slcan_attach applications. > > > > The series, however, still lacks a patch for sending the bitrate setting > > command to the adapter: > > > > slcan_attach -b > > > > Without at least this patch the task cannot be considered truly completed. > > > > The idea I got is that this can only happen through the ethtool API. > > Among the various operations made available by this interface I would > > have used the set_regs (but only the get_regs has been developed), or, > > the set_eeprom, even if the setting would not be stored in an eeprom. > > IMHO it would take a set_regs operation with a `struct ethtool_wregs' > > parameter similar to `struct ethtool_eeprom' without the magic field: > > This doesn't feel right. > > > struct ethtool_wregs { > > __u32 cmd; > > __u32 offset; > > __u32 len; > > __u8 data[0]; > > }; > > > > But I am not the expert and if there was an alternative solution already > > usable, it would be welcome. > > Have a look at the get/set_tunable() callback: > > | https://elixir.bootlin.com/linux/latest/source/include/linux/ethtool.h#L575 > > You probably have to add a new tunable. Here you'll find the people and > commits that changed the tunable: > > | https://github.com/torvalds/linux/blame/master/include/uapi/linux/ethtool.h#L229 > > It's usually worth including them in an RFC patch series where you add a > new tunable and make use of it in the slcan driver. Thank you very much for the suggestions. Regards, Dario > > regards, > Marc > > -- > Pengutronix e.K. | Marc Kleine-Budde | > Embedded Linux | https://www.pengutronix.de | > Vertretung West/Dortmund | Phone: +49-231-2826-924 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- Dario Binacchi Embedded Linux Developer dario.binacchi@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com