From: David Brownell <david-b@pacbell.net>
To: linux-pm@lists.osdl.org
Subject: Re: [patch 2.6.12-rc4] remove driver model detach_state
Date: Fri, 13 May 2005 00:31:52 -0700 [thread overview]
Message-ID: <200505130031.52818.david-b@pacbell.net> (raw)
In-Reply-To: <20050512220632.GA4293@neo.rr.com>
[-- Attachment #1: Type: text/plain, Size: 1818 bytes --]
On Thursday 12 May 2005 3:06 pm, Adam Belay wrote:
>
> Although I agree with this patch, I think it's important that we don't
> forget about the code's original intentions. When manual driver binding
> and unbinding is supported, it would be nice if we could specify a detach
> state. My guess is that this should only include "on" or "off", but not
> any intermediate states.
>
> ->remove isn't good enough, as the driver developer makes the decision
> "let's turn off the device before detaching" or "let's leave it on".
> This will vary between implementations. I think it may be better to
> allow the user to specify this.
Users haven't yet needed it ... or sysadmins either. I don't see
why this should need any policy decisions at all. If unused/idle
devices would just stay in low power modes all the time, then the
only issue would be buggy hardware ... and buggy hardware calls for
hardware-specific workarounds, always. (Either in infrastructure
quirk code, or in the devices' drivers.)
For example, lots of ARM chips (in embedded hardware) leave most
things unclocked, and where relevant also powered down, until they're
needed. That's just the way things are ... reset powers things
down, the bootloader (maybe something like U-Boot) turns on enough
to get Linux started, and then Linux turns on other things as
needed.
Many PCI devices could do the same thing, and stay in D3hot state
until some more active mode is needed.
> Finally, if the device is disabled, the configuration (e.g. PCI config
> space) may need to be restored for the device to work on a future
> driver. This seems like a tricky problem if the driver is removed.
Drivers are expected to initialize using the current hardware state.
If they can't, it's a driver bug. They normally leave PCI config
space alone.
- Dave
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2005-05-13 7:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-12 19:06 [patch 2.6.12-rc4] remove driver model detach_state David Brownell
2005-05-12 19:31 ` Alan Stern
2005-05-12 20:37 ` Greg KH
2005-05-12 22:06 ` Adam Belay
2005-05-13 7:31 ` David Brownell [this message]
2005-05-13 18:37 ` patch driver-remove-detach_state.patch added to gregkh-2.6 tree gregkh
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=200505130031.52818.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-pm@lists.osdl.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