From: Andrew Lunn <andrew@lunn.ch>
To: Dario Binacchi <dariobin@libero.it>
Cc: linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Oliver Hartkopp <socketcan@hartkopp.net>,
Tong Zhang <ztong0001@gmail.com>,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
Wolfgang Grandegger <wg@grandegger.com>,
YueHaibing <yuehaibing@huawei.com>,
Zhang Qilong <zhangqilong3@huawei.com>,
linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v2 1/2] can: c_can: add ethtool support
Date: Thu, 13 May 2021 23:13:31 +0200 [thread overview]
Message-ID: <YJ2We1T+34oj8Mm1@lunn.ch> (raw)
In-Reply-To: <20210513193638.11201-2-dariobin@libero.it>
On Thu, May 13, 2021 at 09:36:37PM +0200, Dario Binacchi wrote:
> With commit 132f2d45fb23 ("can: c_can: add support to 64 message objects")
> the number of message objects used for reception / transmission depends
> on FIFO size.
> The ethtools API support allows you to retrieve this info. Driver info
> has been added too.
Hi Dario
Nice to see the API being re-used for something other than Ethernet.
> +static void c_can_get_drvinfo(struct net_device *netdev,
> + struct ethtool_drvinfo *info)
> +{
> + struct c_can_priv *priv = netdev_priv(netdev);
> + struct platform_device *pdev = to_platform_device(priv->device);
> +
> + strscpy(info->driver, "c_can", sizeof(info->driver));
> + strscpy(info->version, "1.0", sizeof(info->version));
version is pretty meaningless. This driver could be backported into
some enterprise kernel with a huge number of patches. Or more likely,
some in car infotainment kernel with a lot of vendor patches. Lots of
things around the driver change, but it still tells you version
1.0. So we don't recommend filling this in. The ethtool core will then
fill the version what kernel the driver is actually being used in:
https://elixir.bootlin.com/linux/latest/source/net/ethtool/ioctl.c#L706
Andrew
prev parent reply other threads:[~2021-05-13 21:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-13 19:36 Dario Binacchi
2021-05-13 21:13 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YJ2We1T+34oj8Mm1@lunn.ch \
--to=andrew@lunn.ch \
--cc=dariobin@libero.it \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=socketcan@hartkopp.net \
--cc=wg@grandegger.com \
--cc=yuehaibing@huawei.com \
--cc=zhangqilong3@huawei.com \
--cc=ztong0001@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®