From: Hans de Goede <hdegoede@redhat.com>
To: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, Wentong Wu <wentong.wu@intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [PATCH v4 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response
Date: Tue, 12 Nov 2024 11:13:55 +0100 [thread overview]
Message-ID: <48a4d4c6-0c85-4daa-952a-808829a6cfc7@redhat.com> (raw)
In-Reply-To: <20241112075514.680712-1-stanislaw.gruszka@linux.intel.com>
Greg,
This patch 1/3 + patch 2/3 together fix an issue causing the camera to not
work on quite a few ThinkPad models.
Can you maybe pick up patch 1/3 + patch 2/3 already, while
Stanislaw works on fixing 3/3 ?
Regards,
Hans
On 12-Nov-24 8:55 AM, 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>
> ---
> v3 -> v4: no change in this patch
> v2 -> v3: add A-b tag from Sakari
> v1 -> v2: fix handing error of usb_autopm_get_interface(),
> add R-b, T-b tags from Hans
>
> 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;
next prev parent reply other threads:[~2024-11-12 10:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 7:55 [PATCH v4 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response Stanislaw Gruszka
2024-11-12 7:55 ` [PATCH v4 2/3] usb: misc: ljca: set small runtime autosuspend delay Stanislaw Gruszka
2024-11-12 7:55 ` [PATCH v4 3/3] usb: misc: ljca: add firmware version sysfs attribute Stanislaw Gruszka
2024-11-12 8:06 ` Greg Kroah-Hartman
2024-11-12 13:05 ` kernel test robot
2024-11-12 10:13 ` Hans de Goede [this message]
2024-11-12 10:33 ` [PATCH v4 1/3] usb: misc: ljca: move usb_autopm_put_interface() after wait for response Greg Kroah-Hartman
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=48a4d4c6-0c85-4daa-952a-808829a6cfc7@redhat.com \
--to=hdegoede@redhat.com \
--cc=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