From: Pavel Machek <pavel@ucw.cz>
To: David Brownell <david-b@pacbell.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PATCH/RFC: usbcore wakeup updates (3/4)
Date: Fri, 8 Oct 2004 16:19:54 +0200 [thread overview]
Message-ID: <20041008141953.GA2547@openzaurus.ucw.cz> (raw)
In-Reply-To: <200410071758.48625.david-b@pacbell.net>
Hi!
> Though I don't see anything obviously broken about
> (for example) using sysfs to force some devices into
> PCI_D3hot state ... or with maintaining compatibility
> with today's PCI API, which talks in terms of power state.
Nothing is wrong with user telling us to go to specific state. But it is about the
only case where explicit PCI state is neccessary (AFAICS).
> - The sysfs code needs to handle suspending a _tree_ not
> just a single device ... it'll have children if the device is a
> bus adapter (HCD), bridge (hub), or just the floor of a stack
> of virtualized drivers (usb-storage hotplugging SCSI hosts and
> disks on the fly, network adapters, etc). This needs to do
> bottom-up-suspend and top-down-resume -- but it doesn't.
> (And USB has some workarounds, but they may need to cross
> from USB into other driver stacks ...)
I believe nigel has patches...
> - Semantics of _(IDENTIFIER). I think those need to include
> driver-specific values, and that means ripping out code that
> "knows" otherwise. That includes in PMcore code. And
> what makes most sense to me there involves two different
> sets of state identifiers, identified as meaningful strings not
> cryptic digits: (a) a handful of generic states like "idle",
> "lowpower", "on", and "off", plus (b) device-specific states
> that might borrow from the bus (PCI_D1, PCI_D3hot, etc)
> but which can be customized to match the hardware.
I do not think that having both generic and specific states at same interface is
nice... Perhaps we could make it exclusive? If generic state "ON" is same as "PCI_D0",
just forget about "PCI_D0" and always use "ON"...
But these are small details.
> > I'm not sure we want to move to anything complicated than simple enum.
>
> I'm pretty sure we should. If for no other reason than to force
> all the drivers to change. They disagree about what _IDENTIFIER
> means because enums are basically un-typechecked integers,
> and that's unlikely to change.
Well, I am not sure we want "flag day" for drivers.
If we introduce enums than kill all the sparse warnings, we can
get there, too...
> But also, since a typed struct pointer can support lots of other
> policy structures, including things analagous to "cpufreq"
> governors. A set of drivers can agree (maybe because they
> share the same bus, or are otherwise related) that the
> pointer gets container_of() treatment to morph to something
> packaginging much more interesting power policies than a
> simple PCI bus needs. Like for example suspending four
> devices, on different busses, together -- or not at all. Or
> understanding that when these devices all suspend, one
> of the power supplies (or clocks) can be disabled.
I don't see how this could work. Who would call the governors?
Core? Driver? How would you associate drivers with governors?
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
prev parent reply other threads:[~2004-10-16 19:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-04 21:07 David Brownell
2004-10-06 10:51 ` Pavel Machek
2004-10-07 15:35 ` David Brownell
2004-10-07 21:19 ` Pavel Machek
2004-10-08 0:58 ` David Brownell
2004-10-08 14:19 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041008141953.GA2547@openzaurus.ucw.cz \
--to=pavel@ucw.cz \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome