Re: [PATCH 1/5] introduce .wakeup_event ops

Matthew Garrett
2009-08-21T09:23:27Z

On Fri, Aug 21, 2009 at 02:33:50PM +0800, Shaohua Li wrote:
> On Thu, Aug 20, 2009 at 03:40:51PM +0800, Matthew Garrett wrote:
> > _L0B will only be triggered if a PME is generated, so we'll be able to
> > determine which device generated the wakeup by looking at the PME
> > registers.
> Right, but the event is sent to a bridge. The devices under the bridge invoke
> wakeup event, not the bridge itself. So you must scan all devices under the
> bridge to check which device has its PME registers set.
> So the bridge case isn't what you said (notification always sent to a specific
> device which invokes the wakeup event)

Yes, but that's fine because the PME state tells us exactly which device
caused the wakeup. We'll never get a bus notification if the wakeup is
triggered by UHCI on Intel.

--
Matthew Garrett | mjg59@srcf.ucam.org