From: Greg KH <gregkh@linuxfoundation.org>
To: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-usb@vger.kernel.org, Wentong Wu <wentong.wu@intel.com>
Subject: Re: [PATCH v2 3/3] usb: misc: ljca: print firmware version
Date: Thu, 7 Nov 2024 05:21:42 +0100 [thread overview]
Message-ID: <2024110740-egotistic-isolation-52c7@gregkh> (raw)
In-Reply-To: <ZyuCU/qVsLD8Symv@linux.intel.com>
On Wed, Nov 06, 2024 at 03:50:59PM +0100, Stanislaw Gruszka wrote:
> On Wed, Nov 06, 2024 at 01:37:58PM +0000, Sakari Ailus wrote:
> > Hi Greg,
> >
> > On Wed, Nov 06, 2024 at 01:42:33PM +0100, Greg KH wrote:
> > > On Wed, Nov 06, 2024 at 01:34:38PM +0100, Stanislaw Gruszka wrote:
> > > > For diagnostics purposes read firmware version from device
> > > > and print it to dmesg during initialization.
> > >
> > > No, sorry, when drivers work properly, they are quiet. Think about what
> > > your kernel log would look like if you did this for every single driver
> > > in the tree.
>
> Not single one, but there are plenty of drivers in the tree that
> print driver/firmware/hardware version to the log. Few in the usb
> subsystem:
>
> drivers/usb/fotg210/fotg210-udc.c: dev_info(dev, "version %s\n", DRIVER_VERSION);
> drivers/usb/gadget/legacy/acm_ms.c: dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n",
> drivers/usb/gadget/legacy/cdc2.c: dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n",
> drivers/usb/gadget/legacy/ether.c: dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n",
> drivers/usb/gadget/legacy/hid.c: dev_info(&gadget->dev, DRIVER_DESC ", version: " DRIVER_VERSION "\n");
> drivers/usb/gadget/udc/fusb300_udc.c: dev_info(&pdev->dev, "version %s\n", DRIVER_VERSION);
> drivers/usb/gadget/udc/lpc32xx_udc.c: dev_info(udc->dev, "%s version %s\n", driver_name, DRIVER_VERSION);
> drivers/usb/gadget/udc/m66592-udc.c: dev_info(&pdev->dev, "version %s\n", DRIVER_VERSION);
> drivers/usb/gadget/udc/net2272.c: dev_info(dev->dev, "version: %s\n", driver_vers);
> drivers/usb/gadget/udc/net2272.c: dev_info(dev->dev, "RDK2 FPGA version %08x\n",
> drivers/usb/gadget/udc/r8a66597-udc.c: dev_info(dev, "version %s\n", DRIVER_VERSION);
> drivers/usb/gadget/udc/renesas_usbf.c: dev_info(dev, "USBF version: %08x\n",
> drivers/usb/host/xhci-mtk.c: dev_info(mtk->dev, "uwk - reg:0x%x, version:%d\n",
> drivers/usb/mtu3/mtu3_core.c: dev_info(mtu->dev, "IP version 0x%x(%s IP)\n", mtu->hw_version,
> drivers/usb/mtu3/mtu3_host.c: dev_info(ssusb->dev, "uwk - reg:0x%x, version:%d\n",
> drivers/usb/typec/ucsi/ucsi_ccg.c: dev_info(dev, "secondary fw version is too low (< %d)\n",
> drivers/usb/typec/ucsi/ucsi_ccg.c: dev_info(dev, "found primary fw with later version\n");
> drivers/usb/typec/ucsi/ucsi_stm32g0.c: dev_info(g0->dev, "Flashing FW: %08x (%08x cur)\n", fw_info->version, fw_version);
> drivers/usb/typec/ucsi/ucsi_stm32g0.c: dev_info(g0->dev, "Bootloader Version 0x%02x\n", g0->bl_version);
Yes, and all of those should be fixed up and removed.
Also, the idea of "DRIVER_VERSION" is obsolete for a very very long time
and should also just be removed entirely. We swept it from many drivers
years ago, looks like it snuck back in or that we missed some.
thanks,
greg k-h
next prev parent reply other threads:[~2024-11-07 4:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 12:34 [PATCH v2 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response Stanislaw Gruszka
2024-11-06 12:34 ` [PATCH v2 2/3] usb: misc: ljca: set small runtime autosuspend delay Stanislaw Gruszka
2024-11-06 13:33 ` Sakari Ailus
2024-11-06 12:34 ` [PATCH v2 3/3] usb: misc: ljca: print firmware version Stanislaw Gruszka
2024-11-06 12:42 ` Greg KH
2024-11-06 13:37 ` Sakari Ailus
2024-11-06 14:50 ` Stanislaw Gruszka
2024-11-07 4:21 ` Greg KH [this message]
2024-11-06 13:32 ` [PATCH v2 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response Sakari Ailus
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=2024110740-egotistic-isolation-52c7@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stanislaw.gruszka@linux.intel.com \
--cc=wentong.wu@intel.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