lkml.org 
[lkml]   [2014]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] HID: usbhid: get/put around clearing needs_remote_wakeup
    From
    On Fri, Nov 14, 2014 at 1:08 AM, Oliver Neukum <oneukum@suse.de> wrote:
    > On Thu, 2014-11-13 at 12:16 -0800, Benson Leung wrote:
    >
    >> In usbhid_open, usb_autopm_get_interface is called
    >> before setting the needs_remote_wakeup flag, and
    >> usb_autopm_put_interface is called after hid_start_in.
    >>
    >> However, when the device is closed in usbhid_close, the same
    >> protection isn't there when clearing needs_remote_wakeup. This will
    >> add that to usbhid_close as well as usbhid_stop.
    >
    > Interesting, but this has the side effect of waking devices
    > that are asleep just to remove the flag.
    >
    > Regards


    If devices are already asleep with this flag enabled, that means that
    they are presently configured for remote wake.

    Waking the device in the case of a close() is appropriate because it
    also has the effect of re-suspending the device with the capability
    disabled, as it is no longer necessary.

    --
    Benson Leung
    Software Engineer, Chrom* OS
    bleung@chromium.org


    \
     
     \ /
      Last update: 2014-11-22 02:41    [W:7.421 / U:3.680 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site