[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABGWkvpQ_5Yz=B0Q=qJGd1vkysntV=449wbv43opvO6=UDrAJw@mail.gmail.com>
Date: Tue, 26 Jul 2022 14:14:12 +0200
From: Dario Binacchi <dario.binacchi@...rulasolutions.com>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: linux-kernel@...r.kernel.org, michael@...rulasolutions.com,
Amarula patchwork <linux-amarula@...rulasolutions.com>,
Jeroen Hofstee <jhofstee@...tronenergy.com>,
Oliver Hartkopp <socketcan@...tkopp.net>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Wolfgang Grandegger <wg@...ndegger.com>,
linux-can@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v2 0/6] can: slcan: extend supported features (step 2)
Hello Marc,
On Mon, Jul 25, 2022 at 3:25 PM Marc Kleine-Budde <mkl@...gutronix.de> 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 <btr> <dev>
> >
> > 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@...rulasolutions.com
__________________________________
Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info@...rulasolutions.com
www.amarulasolutions.com
Powered by blists - more mailing lists