[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171110160745.GA4090@kroah.com>
Date: Fri, 10 Nov 2017 17:07:45 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Abhijeet@...r.kernel.org, Kumar@...r.kernel.org
Cc: Jaejoong Kim <climbbb.kim@...il.com>,
Jonathan Corbet <corbet@....net>,
Abhijeet Kumar <abhijeet.kumar@...el.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB :core :Prevent USB devices to autosuspend while
setting interface
On Fri, Nov 10, 2017 at 09:32:07PM +0530, Abhijeet@...r.kernel.org 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. Without this
> change, if device autosuspends and the kernel polling for block
> devices is disabled through sysfs at runtime or through bootargs, then
> storage devices might never unmount since the disconnect IRQ wont be
> kicked at all.
>
> Signed-off-by: Abhijeet Kumar <abhijeet.kumar@...el.com>
> ---
> drivers/usb/core/message.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
> index 371a07d874a3..54a9accf88cb 100644
> --- a/drivers/usb/core/message.c
> +++ b/drivers/usb/core/message.c
> @@ -1305,6 +1305,11 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate)
> if (iface->unregistering)
> return -ENODEV;
>
> + /*Letting runtime PM know that we wish to use the device in a
> + * short time.
> + */
Please place comments int the correct style.
> + pm_runtime_get(&iface->dev);
> +
No dropping of the pm_runtime when we are finished?
This feels really wrong to me...
greg k-h
Powered by blists - more mailing lists