linux/include
Tejun Heo 6b7ae9545a libata: reimplement link power management
The current LPM implementation has the following issues.

* Operation order isn't well thought-out.  e.g. HIPM should be
  configured after IPM in SControl is properly configured.  Not the
  other way around.

* Suspend/resume paths call ata_lpm_enable/disable() which must only
  be called from EH context directly.  Also, ata_lpm_enable/disable()
  were called whether LPM was in use or not.

* Implementation is per-port when it should be per-link.  As a result,
  it can't be used for controllers with slave links or PMP.

* LPM state isn't managed consistently.  After a link reset for
  whatever reason including suspend/resume the actual LPM state would
  be reset leaving ap->lpm_policy inconsistent.

* Generic/driver-specific logic boundary isn't clear.  Currently,
  libahci has to mangle stuff which libata EH proper should be
  handling.  This makes the implementation unnecessarily complex and
  fragile.

* Tied to ALPM.  Doesn't consider DIPM only cases and doesn't check
  whether the device allows HIPM.

* Error handling isn't implemented.

Given the extent of mismatch with the rest of libata, I don't think
trying to fix it piecewise makes much sense.  This patch reimplements
LPM support.

* The new implementation is per-link.  The target policy is still
  port-wide (ap->target_lpm_policy) but all the mechanisms and states
  are per-link and integrate well with the rest of link abstraction
  and can work with slave and PMP links.

* Core EH has proper control of LPM state.  LPM state is reconfigured
  when and only when reconfiguration is necessary.  It makes sure that
  LPM state is reset when probing for new device on the link.
  Controller agnostic logic is now implemented in libata EH proper and
  driver implementation only has to deal with controller specifics.

* Proper error handling.  LPM config failure is attributed to the
  device on the link and LPM is disabled for the link if it fails
  repeatedly.

* ops->enable/disable_pm() are replaced with single ops->set_lpm()
  which takes @policy and @hints.  This simplifies driver specific
  implementation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2010-10-21 20:21:04 -04:00
..
acpi ACPI: Fix typos 2010-09-28 21:38:19 -04:00
asm-generic gpio: doc updates 2010-09-09 18:57:24 -07:00
crypto
drm drm/ttm: Fix two race conditions + fix busy codepaths 2010-10-06 09:04:43 +10:00
keys
linux libata: reimplement link power management 2010-10-21 20:21:04 -04:00
math-emu
media V4L/DVB: videobuf-dma-sg: set correct size in last sg element 2010-09-27 22:22:01 -03:00
mtd mtd: Update copyright notices 2010-08-08 20:58:20 +01:00
net Bluetooth: Fix deadlock in the ERTM logic 2010-09-30 12:19:35 -03:00
pcmcia
rdma
rxrpc
scsi scsi: use __uX types for headers exported to user space 2010-08-11 08:59:01 -07:00
sound ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter) 2010-08-18 15:10:59 +02:00
trace Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-08-24 12:21:49 -07:00
video include: replace unifdef-y with header-y 2010-08-14 22:26:51 +02:00
xen xen: pvhvm: make it clearer that XEN_UNPLUG_* define bits in a bitfield 2010-08-23 12:01:35 +01:00
Kbuild