lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 5 Sep 2014 00:40:22 -0700
From:	Todd Poynor <toddpoynor@...gle.com>
To:	balbi@...com
Cc:	Kiran Kumar Raparthy <kiran.kumar@...aro.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org,
	Android Kernel Team <kernel-team@...roid.com>,
	John Stultz <john.stultz@...aro.org>,
	Badhri Jagan Sridharan <badhri@...gle.com>,
	Ruchi Kandoi <kandoiruchi@...gle.com>
Subject: Re: [RFC v2 2/2] usb: phy: Temporarily hold wakeupsource on charger
 connect and disconnect events

On Tue, Sep 2, 2014 at 7:54 AM, Felipe Balbi <balbi@...com> wrote:
> Hi,
>
> On Tue, Sep 02, 2014 at 05:19:18PM +0530, Kiran Kumar Raparthy wrote:
...
>> diff --git a/drivers/usb/phy/otg-wakeupsource.c b/drivers/usb/phy/otg-wakeupsource.c
>> index fca2010..70fa05e 100644
>> --- a/drivers/usb/phy/otg-wakeupsource.c
>> +++ b/drivers/usb/phy/otg-wakeupsource.c
>> @@ -48,7 +48,7 @@ static void otgws_handle_event(struct usb_phy *otgws_xceiv, unsigned long event)
>>       case USB_EVENT_NONE:
>>       case USB_EVENT_ID:
>>       case USB_EVENT_CHARGER:
>> -             usb_drop_wsource(otgws_xceiv);
>> +             usb_temporary_hold_wsource(otgws_xceiv);
>
> looks like this won't work. You're holding the lock even on
> USB_EVEN_NONE. Why ?

It temporarily holds a timed wakeup source on USB disconnect events,
to allow the rest of the system time to react to the USB disconnection
(dropping host sessions, updating charger status, etc.) prior to
re-allowing suspend.


Todd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ