Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Sep 2005 18:03:53 -0700
From:      Nate Lawson <nate@root.org>
To:        Kevin Oberman <oberman@es.net>
Cc:        acpi@FreeBSD.org, Hajimu UMEMOTO <ume@FreeBSD.org>, Bruno Ducrot <bruno@poupinou.org>
Subject:   Re: cvs commit: src/usr.sbin/powerd powerd.c
Message-ID:  <4320DF79.7090205@root.org>
In-Reply-To: <20050901144711.B91E15D07@ptavv.es.net>
References:  <20050901144711.B91E15D07@ptavv.es.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Kevin Oberman wrote:
>>Date: Tue, 30 Aug 2005 11:11:26 -0700
>>From: Nate Lawson <nate@root.org>
>>We do use C3+ if supported, and I agree it gives more power savings when 
>>active.  But even an idle system gets periodic timer interrupts, battery 
>>polling, and other events that require it to exit C3.  So running at a 
>>low CPU rate via throttling may conserve power when not in C3.
> 
> 
> And, of course, if you have USB devices, you can never make it to
> C3. :-(
> 
> I admit I don't understand the issues with USB that cause this, but
> fixing that would likely do more to increase battery life than anything
> else, save the ability to drop the CPU actual clock speed (which we now
> have for most recent mobile platforms).

To go into C3, there are a number of conditions that need to be 
satisfied.  One is that there cannot be any bus masters active since the 
CPU's cache does no snooping while in C3.  However, our current USB hci 
drivers always leave the port in RUN mode which means it is always bus 
mastering.  Hence C3 can't be used when uchi/ohci/ehci are loaded.  They 
do this to get an interrupt when a device is inserted/removed from a USB 
port.

The right fix is to change the hci drivers to suspend the port most of 
the time and only enable it periodically to check for device events. 
This would allow C3 to be used.

In the UHCI 1.1d spec, section 2.1.1 "USBCMD register" describes the 
bits needed to make this happen.  The Run/Stop bit needs to be set to 0 
and then Enter Global Suspend should be set.  I think this is the right 
sequence.  Similar work would need to be done for ohci and ehci.

-- 
Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4320DF79.7090205>