mbox series

[v2,0/3] can: etas_es58x: report firmware version

Message ID 20221104171604.24052-1-mailhol.vincent@wanadoo.fr (mailing list archive)
Headers show
Series can: etas_es58x: report firmware version | expand

Message

Vincent Mailhol Nov. 4, 2022, 5:16 p.m. UTC
The goal of this series is to report the firmware version of ETAS
ES58x devices through ethtool.

The easiest way to do so is by using usb_cache_string so that we do
not have to manage errors.

First patch exports usb_cache_string(). The second patch then does a
small cleanup in the existing function and replace existing code with
usb_cache_string(). The third and final patch reports the firmware
version of the device to the userland through ethtool.

* Changelog *

v1 -> v2:

  * was a single patch. It is now a series of three patches.
  * add a first new patch to export  usb_cache_string().
  * add a second new patch to apply usb_cache_string() to existing code.
  * add missing check on product info string to prevent a buffer overflow.
  * add comma on the last entry of struct es58x_parameters.

Vincent Mailhol (3):
  USB: core: export usb_cache_string()
  can: etas_es58x: use usb_cache_string() to retrieve the product info
    string
  can: etas_es58x: report the firmware version through ethtool

 drivers/net/can/usb/etas_es58x/es581_4.c    |  5 +-
 drivers/net/can/usb/etas_es58x/es58x_core.c | 75 ++++++++++++---------
 drivers/net/can/usb/etas_es58x/es58x_core.h |  8 ++-
 drivers/net/can/usb/etas_es58x/es58x_fd.c   |  5 +-
 drivers/usb/core/message.c                  |  1 +
 drivers/usb/core/usb.h                      |  1 -
 include/linux/usb.h                         |  1 +
 7 files changed, 60 insertions(+), 36 deletions(-)