[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171115142320.GE11226@localhost>
Date: Wed, 15 Nov 2017 15:23:20 +0100
From: Johan Hovold <johan@...nel.org>
To: abhijeet.kumar@...el.com
Cc: Marcel Holtmann <marcel@...tmann.org>,
Gustavo Padovan <gustavo@...ovan.org>,
Johan Hedberg <johan.hedberg@...il.com>,
linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Bluettoth: btusb: Prevent USB devices to autosuspend
while setting interface
On Wed, Nov 15, 2017 at 05:41:28PM +0530, abhijeet.kumar@...el.com wrote:
> From: Abhijeet Kumar <abhijeet.kumar@...el.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@...el.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
Powered by blists - more mailing lists