Message ID | 20241107073718.405208-1-stanislaw.gruszka@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v3,1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response | expand |
On Thu, Nov 07, 2024 at 08:37:16AM +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 > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> > --- > v2: fix handing error of usb_autopm_get_interface(), > add R-b, T-b tags from Hans > v3: add A-b tag from Sakari > > drivers/usb/misc/usb-ljca.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) For some reason you aren't sending this to the usb maintainer to be applied, oh well...
On Thu, Nov 07, 2024 at 09:16:01AM +0100, Greg KH wrote: > On Thu, Nov 07, 2024 at 08:37:16AM +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 > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> > > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> > > --- > > v2: fix handing error of usb_autopm_get_interface(), > > add R-b, T-b tags from Hans > > v3: add A-b tag from Sakari > > > > drivers/usb/misc/usb-ljca.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > For some reason you aren't sending this to the usb maintainer to be > applied, oh well... Sorry, I thought sending patches to the mailing list is sufficient to get them applied. Regards Stanislaw
On Thu, Nov 07, 2024 at 09:55:01AM +0100, Stanislaw Gruszka wrote: > On Thu, Nov 07, 2024 at 09:16:01AM +0100, Greg KH wrote: > > On Thu, Nov 07, 2024 at 08:37:16AM +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 > > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> > > > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> > > > --- > > > v2: fix handing error of usb_autopm_get_interface(), > > > add R-b, T-b tags from Hans > > > v3: add A-b tag from Sakari > > > > > > drivers/usb/misc/usb-ljca.c | 12 ++++++------ > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > For some reason you aren't sending this to the usb maintainer to be > > applied, oh well... > > Sorry, I thought sending patches to the mailing list is sufficient > to get them applied. Please work with the Intel internal group to get their approval and review before sending out your next round of patches for this, as they know how to catch trivial stuff like this before forcing others to point it out :) thanks, greg k-h
Hi Greg, On Thu, Nov 07, 2024 at 10:03:56AM +0100, Greg KH wrote: > On Thu, Nov 07, 2024 at 09:55:01AM +0100, Stanislaw Gruszka wrote: > > On Thu, Nov 07, 2024 at 09:16:01AM +0100, Greg KH wrote: > > > On Thu, Nov 07, 2024 at 08:37:16AM +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 > > > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> > > > > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> > > > > --- > > > > v2: fix handing error of usb_autopm_get_interface(), > > > > add R-b, T-b tags from Hans > > > > v3: add A-b tag from Sakari > > > > > > > > drivers/usb/misc/usb-ljca.c | 12 ++++++------ > > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > > > For some reason you aren't sending this to the usb maintainer to be > > > applied, oh well... > > > > Sorry, I thought sending patches to the mailing list is sufficient > > to get them applied. > > Please work with the Intel internal group to get their approval and > review before sending out your next round of patches for this, as they > know how to catch trivial stuff like this before forcing others to point > it out :) Stanislaw's choses recipients are aligned with get_maintainer.pl output, sauf some who posted occasional cleanups. If that list wasn't correct, then there's something to fix in MAINTAINERS.
On Thu, Nov 07, 2024 at 09:32:38AM +0000, Sakari Ailus wrote: > Hi Greg, > > On Thu, Nov 07, 2024 at 10:03:56AM +0100, Greg KH wrote: > > On Thu, Nov 07, 2024 at 09:55:01AM +0100, Stanislaw Gruszka wrote: > > > On Thu, Nov 07, 2024 at 09:16:01AM +0100, Greg KH wrote: > > > > On Thu, Nov 07, 2024 at 08:37:16AM +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 > > > > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> > > > > > Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> > > > > > --- > > > > > v2: fix handing error of usb_autopm_get_interface(), > > > > > add R-b, T-b tags from Hans > > > > > v3: add A-b tag from Sakari > > > > > > > > > > drivers/usb/misc/usb-ljca.c | 12 ++++++------ > > > > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > > > > > For some reason you aren't sending this to the usb maintainer to be > > > > applied, oh well... > > > > > > Sorry, I thought sending patches to the mailing list is sufficient > > > to get them applied. > > > > Please work with the Intel internal group to get their approval and > > review before sending out your next round of patches for this, as they > > know how to catch trivial stuff like this before forcing others to point > > it out :) > > Stanislaw's choses recipients are aligned with get_maintainer.pl output, > sauf some who posted occasional cleanups. If that list wasn't correct, then > there's something to fix in MAINTAINERS. Nothing is wrong with MAINTAINERS: $ ./scripts/get_maintainer.pl --file drivers/usb/misc/usb-ljca.c Wentong Wu <wentong.wu@intel.com> (maintainer:INTEL LA JOLLA COVE ADAPTER (LJCA) USB I/O EXPA...) Sakari Ailus <sakari.ailus@linux.intel.com> (maintainer:INTEL LA JOLLA COVE ADAPTER (LJCA) USB I/O EXPA...) Greg Kroah-Hartman <gregkh@linuxfoundation.org> (supporter:USB SUBSYSTEM) linux-usb@vger.kernel.org (open list:USB SUBSYSTEM) linux-kernel@vger.kernel.org (open list)
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;