Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1393240
| From | Felipe Balbi <felipe.balbi@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend |
| Date | 2016-05-03 11:40 +0200 |
| Message-ID | <ruEYb-5FG-21@gated-at.bofh.it> (permalink) |
| References | <rqce5-1g6-1@gated-at.bofh.it> <ruDfH-3LT-1@gated-at.bofh.it> <ruDpp-3Rg-19@gated-at.bofh.it> <ruEEP-5sx-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi,
chunfeng yun <chunfeng.yun@mediatek.com> writes:
>> chunfeng yun <chunfeng.yun@mediatek.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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend chunfeng yun <chunfeng.yun@mediatek.com> - 2016-05-03 09:50 +0200
Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-05-03 10:00 +0200
Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend chunfeng yun <chunfeng.yun@mediatek.com> - 2016-05-03 11:20 +0200
Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-05-03 11:40 +0200
Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend chunfeng yun <chunfeng.yun@mediatek.com> - 2016-05-04 03:30 +0200
Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-05-04 10:10 +0200
Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend chunfeng yun <chunfeng.yun@mediatek.com> - 2016-05-04 13:00 +0200
Re: [PATCH] usb: xhci-mtk: fixup mouse wakeup failure during system suspend Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-05-04 14:00 +0200
csiph-web