* [PATCH v2 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response
@ 2024-11-06 12:34 Stanislaw Gruszka
2024-11-06 12:34 ` [PATCH v2 2/3] usb: misc: ljca: set small runtime autosuspend delay Stanislaw Gruszka
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Stanislaw Gruszka @ 2024-11-06 12:34 UTC (permalink / raw)
To: linux-usb; +Cc: Wentong Wu, Sakari Ailus
Do not mark interface as ready to suspend when we are still waiting
for response messages from the device.
Fixes: acd6199f195d ("usb: Add support for Intel LJCA device")
Cc: stable@vger.kernel.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com> # ThinkPad X1 Yoga Gen 8, ov2740
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
---
drivers/usb/misc/usb-ljca.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c
index 01ceafc4ab78..8056c65e4548 100644
--- a/drivers/usb/misc/usb-ljca.c
+++ b/drivers/usb/misc/usb-ljca.c
@@ -332,14 +332,11 @@ static int ljca_send(struct ljca_adapter *adap, u8 type, u8 cmd,
ret = usb_bulk_msg(adap->usb_dev, adap->tx_pipe, header,
msg_len, &transferred, LJCA_WRITE_TIMEOUT_MS);
-
- usb_autopm_put_interface(adap->intf);
-
if (ret < 0)
- goto out;
+ goto out_put;
if (transferred != msg_len) {
ret = -EIO;
- goto out;
+ goto out_put;
}
if (ack) {
@@ -347,11 +344,14 @@ static int ljca_send(struct ljca_adapter *adap, u8 type, u8 cmd,
timeout);
if (!ret) {
ret = -ETIMEDOUT;
- goto out;
+ goto out_put;
}
}
ret = adap->actual_length;
+out_put:
+ usb_autopm_put_interface(adap->intf);
+
out:
spin_lock_irqsave(&adap->lock, flags);
adap->ex_buf = NULL;
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 2/3] usb: misc: ljca: set small runtime autosuspend delay 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 ` 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 13:32 ` [PATCH v2 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response Sakari Ailus 2 siblings, 1 reply; 9+ messages in thread From: Stanislaw Gruszka @ 2024-11-06 12:34 UTC (permalink / raw) To: linux-usb; +Cc: Wentong Wu, Sakari Ailus On some Lenovo platforms, the patch workarounds problems with ov2740 sensor initialization, which manifest themself like below: [ 4.540476] ov2740 i2c-INT3474:01: error -EIO: failed to find sensor [ 4.542066] ov2740 i2c-INT3474:01: probe with driver ov2740 failed with error -5 or [ 7.742633] ov2740 i2c-INT3474:01: chip id mismatch: 2740 != 0 [ 7.742638] ov2740 i2c-INT3474:01: error -ENXIO: failed to find sensor and also by random failures of video stream start. Issue can be reproduced by this script: n=0 k=0 while [ $n -lt 50 ] ; do sudo modprobe -r ov2740 sleep `expr $RANDOM % 5` sudo modprobe ov2740 if media-ctl -p | grep -q ov2740 ; then let k++ fi let n++ done echo Success rate $k/$n Without the patch, success rate is approximately 15 or 50 tries. With the patch it does not fail. This problem is some hardware or firmware malfunction, that can not be easy debug and fix. While setting small autosuspend delay is not perfect workaround as user can configure it to any value, it will prevent the failures by default. Additionally setting small autosuspend delay should have positive effect on power consumption as for most ljca workloads device is used for just a few milliseconds flowed by long periods of at least 100ms of inactivity (usually more). Fixes: acd6199f195d ("usb: Add support for Intel LJCA device") Cc: stable@vger.kernel.org Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> # ThinkPad X1 Yoga Gen 8, ov2740 Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> --- drivers/usb/misc/usb-ljca.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c index 8056c65e4548..d9c21f783055 100644 --- a/drivers/usb/misc/usb-ljca.c +++ b/drivers/usb/misc/usb-ljca.c @@ -811,6 +811,14 @@ static int ljca_probe(struct usb_interface *interface, if (ret) goto err_free; + /* + * This works around problems with ov2740 initialization on some + * Lenovo platforms. The autosuspend delay, has to be smaller than + * the delay after setting the reset_gpio line in ov2740_resume(). + * Otherwise the sensor randomly fails to initialize. + */ + pm_runtime_set_autosuspend_delay(&usb_dev->dev, 10); + usb_enable_autosuspend(usb_dev); return 0; -- 2.34.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] usb: misc: ljca: set small runtime autosuspend delay 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 0 siblings, 0 replies; 9+ messages in thread From: Sakari Ailus @ 2024-11-06 13:33 UTC (permalink / raw) To: Stanislaw Gruszka; +Cc: linux-usb, Wentong Wu On Wed, Nov 06, 2024 at 01:34:37PM +0100, Stanislaw Gruszka wrote: > On some Lenovo platforms, the patch workarounds problems with ov2740 > sensor initialization, which manifest themself like below: > > [ 4.540476] ov2740 i2c-INT3474:01: error -EIO: failed to find sensor > [ 4.542066] ov2740 i2c-INT3474:01: probe with driver ov2740 failed with error -5 > > or > > [ 7.742633] ov2740 i2c-INT3474:01: chip id mismatch: 2740 != 0 > [ 7.742638] ov2740 i2c-INT3474:01: error -ENXIO: failed to find sensor > > and also by random failures of video stream start. > > Issue can be reproduced by this script: > > n=0 > k=0 > while [ $n -lt 50 ] ; do > sudo modprobe -r ov2740 > sleep `expr $RANDOM % 5` > sudo modprobe ov2740 > if media-ctl -p | grep -q ov2740 ; then > let k++ > fi > let n++ > done > echo Success rate $k/$n > > Without the patch, success rate is approximately 15 or 50 tries. > With the patch it does not fail. > > This problem is some hardware or firmware malfunction, that can not be > easy debug and fix. While setting small autosuspend delay is not perfect > workaround as user can configure it to any value, it will prevent > the failures by default. > > Additionally setting small autosuspend delay should have positive effect > on power consumption as for most ljca workloads device is used for just > a few milliseconds flowed by long periods of at least 100ms of inactivity > (usually more). > > Fixes: acd6199f195d ("usb: Add support for Intel LJCA device") > Cc: stable@vger.kernel.org > Reviewed-by: Hans de Goede <hdegoede@redhat.com> > Tested-by: Hans de Goede <hdegoede@redhat.com> # ThinkPad X1 Yoga Gen 8, ov2740 > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> -- Sakari Ailus ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 3/3] usb: misc: ljca: print firmware version 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 12:34 ` Stanislaw Gruszka 2024-11-06 12:42 ` Greg KH 2024-11-06 13:32 ` [PATCH v2 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response Sakari Ailus 2 siblings, 1 reply; 9+ messages in thread From: Stanislaw Gruszka @ 2024-11-06 12:34 UTC (permalink / raw) To: linux-usb; +Cc: Wentong Wu, Sakari Ailus For diagnostics purposes read firmware version from device and print it to dmesg during initialization. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com> # ThinkPad X1 Yoga Gen 8, ov2740 Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> --- drivers/usb/misc/usb-ljca.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c index d9c21f783055..e698a1075a40 100644 --- a/drivers/usb/misc/usb-ljca.c +++ b/drivers/usb/misc/usb-ljca.c @@ -43,6 +43,7 @@ enum ljca_client_type { /* MNG client commands */ enum ljca_mng_cmd { + LJCA_MNG_GET_VERSION = 1, LJCA_MNG_RESET = 2, LJCA_MNG_ENUM_GPIO = 4, LJCA_MNG_ENUM_I2C = 5, @@ -68,6 +69,13 @@ struct ljca_msg { u8 data[] __counted_by(len); } __packed; +struct ljca_fw_version { + u8 major; + u8 minor; + __le16 patch; + __le16 build; +} __packed; + struct ljca_i2c_ctr_info { u8 id; u8 capacity; @@ -695,6 +703,25 @@ static int ljca_reset_handshake(struct ljca_adapter *adap) return 0; } +static void ljca_print_fw_version(struct ljca_adapter *adap) +{ + struct ljca_fw_version version = {}; + int ret; + + ret = ljca_send(adap, LJCA_CLIENT_MNG, LJCA_MNG_GET_VERSION, NULL, 0, + (u8 *)&version, sizeof(version), true, + LJCA_WRITE_ACK_TIMEOUT_MS); + + if (ret != sizeof(version)) { + dev_err(adap->dev, "Get version failed, ret: %d\n", ret); + return; + } + + dev_info(adap->dev, "Firmware version: %d.%d.%d.%d\n", + version.major, version.minor, + le16_to_cpu(version.patch), le16_to_cpu(version.build)); +} + static int ljca_enumerate_clients(struct ljca_adapter *adap) { struct ljca_client *client, *next; @@ -811,6 +838,8 @@ static int ljca_probe(struct usb_interface *interface, if (ret) goto err_free; + ljca_print_fw_version(adap); + /* * This works around problems with ov2740 initialization on some * Lenovo platforms. The autosuspend delay, has to be smaller than -- 2.34.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] usb: misc: ljca: print firmware version 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 0 siblings, 1 reply; 9+ messages in thread From: Greg KH @ 2024-11-06 12:42 UTC (permalink / raw) To: Stanislaw Gruszka; +Cc: linux-usb, Wentong Wu, Sakari Ailus 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. > > Reviewed-by: Hans de Goede <hdegoede@redhat.com> > Tested-by: Hans de Goede <hdegoede@redhat.com> # ThinkPad X1 Yoga Gen 8, ov2740 > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> > --- > drivers/usb/misc/usb-ljca.c | 29 +++++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c > index d9c21f783055..e698a1075a40 100644 > --- a/drivers/usb/misc/usb-ljca.c > +++ b/drivers/usb/misc/usb-ljca.c > @@ -43,6 +43,7 @@ enum ljca_client_type { > > /* MNG client commands */ > enum ljca_mng_cmd { > + LJCA_MNG_GET_VERSION = 1, > LJCA_MNG_RESET = 2, > LJCA_MNG_ENUM_GPIO = 4, > LJCA_MNG_ENUM_I2C = 5, > @@ -68,6 +69,13 @@ struct ljca_msg { > u8 data[] __counted_by(len); > } __packed; > > +struct ljca_fw_version { > + u8 major; > + u8 minor; > + __le16 patch; > + __le16 build; > +} __packed; > + > struct ljca_i2c_ctr_info { > u8 id; > u8 capacity; > @@ -695,6 +703,25 @@ static int ljca_reset_handshake(struct ljca_adapter *adap) > return 0; > } > > +static void ljca_print_fw_version(struct ljca_adapter *adap) > +{ > + struct ljca_fw_version version = {}; > + int ret; > + > + ret = ljca_send(adap, LJCA_CLIENT_MNG, LJCA_MNG_GET_VERSION, NULL, 0, > + (u8 *)&version, sizeof(version), true, > + LJCA_WRITE_ACK_TIMEOUT_MS); > + > + if (ret != sizeof(version)) { > + dev_err(adap->dev, "Get version failed, ret: %d\n", ret); > + return; Why not return the error? > + } > + > + dev_info(adap->dev, "Firmware version: %d.%d.%d.%d\n", > + version.major, version.minor, > + le16_to_cpu(version.patch), le16_to_cpu(version.build)); Again, sorry, but no. Feel free to dump this in a sysfs file if you really want to get access to it, but not in the kernel log. thanks, greg k-h ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] usb: misc: ljca: print firmware version 2024-11-06 12:42 ` Greg KH @ 2024-11-06 13:37 ` Sakari Ailus 2024-11-06 14:50 ` Stanislaw Gruszka 0 siblings, 1 reply; 9+ messages in thread From: Sakari Ailus @ 2024-11-06 13:37 UTC (permalink / raw) To: Greg KH; +Cc: Stanislaw Gruszka, linux-usb, Wentong Wu 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. > > > > > Reviewed-by: Hans de Goede <hdegoede@redhat.com> > > Tested-by: Hans de Goede <hdegoede@redhat.com> # ThinkPad X1 Yoga Gen 8, ov2740 > > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> > > --- > > drivers/usb/misc/usb-ljca.c | 29 +++++++++++++++++++++++++++++ > > 1 file changed, 29 insertions(+) > > > > diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c > > index d9c21f783055..e698a1075a40 100644 > > --- a/drivers/usb/misc/usb-ljca.c > > +++ b/drivers/usb/misc/usb-ljca.c > > @@ -43,6 +43,7 @@ enum ljca_client_type { > > > > /* MNG client commands */ > > enum ljca_mng_cmd { > > + LJCA_MNG_GET_VERSION = 1, > > LJCA_MNG_RESET = 2, > > LJCA_MNG_ENUM_GPIO = 4, > > LJCA_MNG_ENUM_I2C = 5, > > @@ -68,6 +69,13 @@ struct ljca_msg { > > u8 data[] __counted_by(len); > > } __packed; > > > > +struct ljca_fw_version { > > + u8 major; > > + u8 minor; > > + __le16 patch; > > + __le16 build; > > +} __packed; > > + > > struct ljca_i2c_ctr_info { > > u8 id; > > u8 capacity; > > @@ -695,6 +703,25 @@ static int ljca_reset_handshake(struct ljca_adapter *adap) > > return 0; > > } > > > > +static void ljca_print_fw_version(struct ljca_adapter *adap) > > +{ > > + struct ljca_fw_version version = {}; > > + int ret; > > + > > + ret = ljca_send(adap, LJCA_CLIENT_MNG, LJCA_MNG_GET_VERSION, NULL, 0, > > + (u8 *)&version, sizeof(version), true, > > + LJCA_WRITE_ACK_TIMEOUT_MS); > > + > > + if (ret != sizeof(version)) { > > + dev_err(adap->dev, "Get version failed, ret: %d\n", ret); > > + return; > > Why not return the error? An error here would indicate something is a little fishy but doesn't prevent the device from working as such. I'd think it's fine as-is. > > > + } > > + > > + dev_info(adap->dev, "Firmware version: %d.%d.%d.%d\n", > > + version.major, version.minor, > > + le16_to_cpu(version.patch), le16_to_cpu(version.build)); > > Again, sorry, but no. Feel free to dump this in a sysfs file if you > really want to get access to it, but not in the kernel log. I guess dev_dbg() should do as well. -- Regards, Sakari Ailus ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] usb: misc: ljca: print firmware version 2024-11-06 13:37 ` Sakari Ailus @ 2024-11-06 14:50 ` Stanislaw Gruszka 2024-11-07 4:21 ` Greg KH 0 siblings, 1 reply; 9+ messages in thread From: Stanislaw Gruszka @ 2024-11-06 14:50 UTC (permalink / raw) To: Sakari Ailus; +Cc: Greg KH, linux-usb, Wentong Wu 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); > > > Reviewed-by: Hans de Goede <hdegoede@redhat.com> > > > Tested-by: Hans de Goede <hdegoede@redhat.com> # ThinkPad X1 Yoga Gen 8, ov2740 > > > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> > > > --- > > > drivers/usb/misc/usb-ljca.c | 29 +++++++++++++++++++++++++++++ <snip> > > > + } > > > + > > > + dev_info(adap->dev, "Firmware version: %d.%d.%d.%d\n", > > > + version.major, version.minor, > > > + le16_to_cpu(version.patch), le16_to_cpu(version.build)); > > > > Again, sorry, but no. Feel free to dump this in a sysfs file if you > > really want to get access to it, but not in the kernel log. > > I guess dev_dbg() should do as well. I think that's better as we currently do not support sysfs in ljca, so extra code would be needed. Regards Stanislaw ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] usb: misc: ljca: print firmware version 2024-11-06 14:50 ` Stanislaw Gruszka @ 2024-11-07 4:21 ` Greg KH 0 siblings, 0 replies; 9+ messages in thread From: Greg KH @ 2024-11-07 4:21 UTC (permalink / raw) To: Stanislaw Gruszka; +Cc: Sakari Ailus, linux-usb, Wentong Wu 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response 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 12:34 ` [PATCH v2 3/3] usb: misc: ljca: print firmware version Stanislaw Gruszka @ 2024-11-06 13:32 ` Sakari Ailus 2 siblings, 0 replies; 9+ messages in thread From: Sakari Ailus @ 2024-11-06 13:32 UTC (permalink / raw) To: Stanislaw Gruszka; +Cc: linux-usb, Wentong Wu On Wed, Nov 06, 2024 at 01:34:36PM +0100, Stanislaw Gruszka wrote: > Do not mark interface as ready to suspend when we are still waiting > for response messages from the device. > > Fixes: acd6199f195d ("usb: Add support for Intel LJCA device") > Cc: stable@vger.kernel.org > Reviewed-by: Hans de Goede <hdegoede@redhat.com> > Tested-by: Hans de Goede <hdegoede@redhat.com> # ThinkPad X1 Yoga Gen 8, ov2740 > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> -- Sakari Ailus ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-11-07 4:22 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2024-11-06 13:32 ` [PATCH v2 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response Sakari Ailus
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox