From: Johan Hovold <johan@kernel.org>
To: abhijeet.kumar@intel.com
Cc: Marcel Holtmann <marcel@holtmann.org>,
Gustavo Padovan <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Bluettoth: btusb: Prevent USB devices to autosuspend while setting interface
Date: Wed, 15 Nov 2017 15:23:20 +0100 [thread overview]
Message-ID: <20171115142320.GE11226@localhost> (raw)
In-Reply-To: <1510747888-13912-1-git-send-email-abhijeet.kumar@intel.com>
On Wed, Nov 15, 2017 at 05:41:28PM +0530, abhijeet.kumar@intel.com wrote:
> From: Abhijeet Kumar <abhijeet.kumar@intel.com>
>
> Runtime resume USB device in order to ensure that PM framework knows
> that the we might be using the device in a short time and doesn't
> autosuspend the device while we update it's interface.
>
> Signed-off-by: Abhijeet Kumar <abhijeet.kumar@intel.com>
> ---
> drivers/bluetooth/btusb.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 7a5c06aaa181..588aabf991be 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -1444,6 +1444,12 @@ static void btusb_work(struct work_struct *work)
> data->sco_skb = NULL;
> spin_unlock_irqrestore(&data->rxlock, flags);
>
> + /*
> + *Letting runtime PM know that we wish to use
> + *the device in a short time.
> + */
> + pm_runtime_get(&data->udev->dev);
> +
This is broken. Where is the corresponding put? And why would you need
this at all, given that the interface is resumed at the start of this
branch?
> if (__set_isoc_interface(hdev, new_alts) < 0)
> return;
> }
Johan
prev parent reply other threads:[~2017-11-15 14:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 12:11 [PATCH] Bluettoth: btusb: Prevent USB devices to autosuspend while setting interface abhijeet.kumar
2017-11-15 13:54 ` Marcel Holtmann
2017-11-15 14:01 ` Bastien Nocera
2017-11-15 14:23 ` Johan Hovold [this message]
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=20171115142320.GE11226@localhost \
--to=johan@kernel.org \
--cc=abhijeet.kumar@intel.com \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
/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