Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2717477imi; Mon, 25 Jul 2022 06:33:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tg+NJHicz6JtD+wBR+fvGF66ug4X5nL/WmjibuDtAtn7BjBy8DUrC0s7BT+piC9HuD/19I X-Received: by 2002:a9d:6c43:0:b0:61c:9d1e:b43e with SMTP id g3-20020a9d6c43000000b0061c9d1eb43emr4955549otq.365.1658756038187; Mon, 25 Jul 2022 06:33:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658756038; cv=none; d=google.com; s=arc-20160816; b=ciPf/rnUn2MkjTGFHX09X9HBGhrjG6DH44q4Er/8ZhU2QpUoML+zmey7TFu3Re45x1 4mrWTi68wwA8HpSMZQoDOQX0jjLNCQbppTm5Ys/SxqKjU9zYjASdDXovDaIBfe0Ugzts yqOGqUhCDwADAl4Ou7AvZ4WV1YQtx0kv6BVxjanonUYOIaRy67gOTqQ5wKw+Suy9hVkU yQOugZu7OAthKCVm2Oi1J21oo7LVJmdEDoyvkWS8qNNVfqDgnse67vfRzP+h6VWX7lW2 D/fCDSPuILxRRrF535yaRIxe9pkWN6CAnq3fuyIs1ilTV62kzvY7Amjts5An7YBE9yaA Ydtw== 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=nnuaBvwXkMU/jQb+trDGOc/iUfz7XEiH/c7k9zZN+VI=; b=syj6rKfsPBT5TCugkEB+BVQ+fUQslX6waAcC2QaFtmgYKU4Su/3j6Hies9DcVYOVqI Z2gsrduQn3E7vthi5GKOs3zlzs4PRlyzQgvseQRCJaeryCNAbyyzJv4ASAnfAUYJg/Qa oJ07Uovm4TCAWXnMNlDBUHTA4ikEClhlEDrzw8W9zhOLAucdzlqIv5tm0LBuZItvqrgF HrCNpwTBuV6WiIzhVqk/6lbFxIujnP0ooyhasSJcNwYXX9feXp49MVTzqrVMagbWuchN yzNa3S6726t+muSyXKJGv7wOaLrDlSJbWtaCi9VJd6ujEOp3gb/d9xc7L101z4351wFR WW/A== 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 a94-20020a9d2667000000b0061c3541f192si8496694otb.324.2022.07.25.06.33.42; Mon, 25 Jul 2022 06:33:58 -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 S235500AbiGYNZg (ORCPT + 99 others); Mon, 25 Jul 2022 09:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232494AbiGYNZd (ORCPT ); Mon, 25 Jul 2022 09:25:33 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D2D826ED for ; Mon, 25 Jul 2022 06:25:32 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFy5G-0002CC-6O; Mon, 25 Jul 2022 15:25:18 +0200 Received: from pengutronix.de (unknown [IPv6:2a01:4f8:1c1c:29e9:22:41ff:fe00:1400]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 1793DB9964; Mon, 25 Jul 2022 13:25:15 +0000 (UTC) Date: Mon, 25 Jul 2022 15:25:14 +0200 From: Marc Kleine-Budde To: Dario Binacchi 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 Subject: Re: [PATCH v2 0/6] can: slcan: extend supported features (step 2) Message-ID: <20220725132514.h3iva4xi4sdncus6@pengutronix.de> References: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yohv5x576q7yvjhc" Content-Disposition: inline In-Reply-To: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 --yohv5x576q7yvjhc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > The series, however, still lacks a patch for sending the bitrate setting > command to the adapter: >=20 > slcan_attach -b >=20 > Without at least this patch the task cannot be considered truly completed. >=20 > 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]; > }; >=20 > 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#L5= 75 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= =2Eh#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. regards, Marc --=20 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 | --yohv5x576q7yvjhc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmLembgACgkQrX5LkNig 011YBwf8D6sYc5Z10hNfGDyKQ3RcYyhgRysl2n8u/I+7BTE6Y3+sOXF5X0Gt5auQ O3L54lyy3/LKsyXwoCRPUgMOgbLCPwPI0EqLNEKhpTrQAJ5h0uCbRZkUREhkngtO Tr9MoBK+7JmHVOpZUBVVIXB631k/RNvCZQXm1wlUsumXqX13EFPImJvuk+dDo1lm TrM1mSGX8FAq4OG2mlvdLwztIJExjprR2hP2zyUs3gEJk6r4z5z5N5TBCcU8+bH0 98kyOZzlpUcSB1tIK7V1KHOsW2kifnyGGueznkI/V22bNzq0E4e1jeUjANuEtMXm nWmiiH/XE7rvUL/kf4ER0yut8pUv8g== =K8BG -----END PGP SIGNATURE----- --yohv5x576q7yvjhc--