[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87mvo7fpuc.fsf@intel.com>
Date: Tue, 03 May 2016 12:33:31 +0300
From: Felipe Balbi <felipe.balbi@...ux.intel.com>
To: chunfeng yun <chunfeng.yun@...iatek.com>
Cc: Mathias Nyman <mathias.nyman@...el.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Felipe Balbi <balbi@...com>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-usb@...r.kernel.org,
linux-mediatek@...ts.infradead.org,
Daniel Kurtz <djkurtz@...omium.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend
Hi,
chunfeng yun <chunfeng.yun@...iatek.com> writes:
>> chunfeng yun <chunfeng.yun@...iatek.com> writes:
>> > On Thu, 2016-04-21 at 10:04 +0800, Chunfeng Yun wrote:
>> >> Click mouse after xhci suspend completion but before system suspend
>> >> completion, system will not be waken up by mouse if the duration of
>> >> them is larger than 20ms which is the device UFP's resume signaling
>>
>> what is "them" here ? The duration of what is longer than 20ms ?
> They are "xhci suspend completion" and "system suspend completion";
>
> It's time duration
okay. So if xhci suspend takes longer than 20ms your SPM doesn't see a
wakeup ?
>> >> lasted. Another reason is that the SPM is not enabled before system
>>
>> what's SPM ?
> It is System Power Management which is powered off when system is
> running in normal mode, and is powered on when system enters suspend
> mode. It is used to wakeup system when some wakeup sources, such as
> bluetooth or powerkey etc, tigger wakeup event.
okay, thanks
>> >> suspend compeltion, this causes SPM also not notice the resume signal.
>> ^^^^^^^^^^
>> completion
>>
>> >> So in order to reduce the duration less than 20ms, make use of
>> >> syscore's suspend/resume interface.
>>
>> no, this is the wrong approach
> But it seems only one workable approach from software side
I wouldn't say that. It seems to me SPM should be enabled earlier.
>> >> Because the syscore runs on irq disabled context, and xhci's
>> >> suspend/resume calls some sleeping functions, enable local irq
>> >> and then disable it during suspend/resume. This may be not a problem,
>> >> since only boot CPU is runing.
>>
>> another problem :) calling local_irq_{enable,disable}() is an indication
>> that something's wrong.
> Oh!
>
> BTW: There will be warning logs if they are not called.
yeah, I got that :-) But it's still wrong to use
local_irq_{enable,disable}() the way you're using them :-)
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (819 bytes)
Powered by blists - more mailing lists