1
linux/drivers
Tejun Heo d447df140d ahci: implement ata_save/restore_initial_config()
There are several registers which describe how the controller is
configured.  These registers are sometimes implemented as r/w
registers which are configured by firmware and get cleared on
controller reset or after suspend/resume cycle.  ahci saved and
restored those values inside ahci_reset_controller() which is a bit
messy and doesn't work over suspend/resume cycle.

This patch implements ahci_save/restore_initial_config().  The save
function is called during driver initialization and saves cap and
port_map to hpriv.  The restore function is called after the
controller is reset to restore the initial values.

Sometimes the initial firmware values are inconsistent and need to be
fixed up.  This is handled by ahci_save_initial_config().  For this,
there are two versions of saved registers.  One to write back to the
hardware register, the other to use during driver operation.  This is
necessary to keep ahci's behavior unchanged (write back fixed up
port_map while keeping cap as-is).

This patch makes ahci save the register values once before the first
controller reset, not after it's been reset.  Also, the same stored
values are used written back after each reset, so the register values
are properly recovered after suspend/resume cycle.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
..
acorn
acpi
amba uevent: use add_uevent_var() instead of open coding it 2007-04-27 10:57:29 -07:00
ata ahci: implement ata_save/restore_initial_config() 2007-04-28 14:16:01 -04:00
atm
auxdisplay
base drivers/base/attribute_container.c: use mutex instead of binary semaphore 2007-04-27 10:57:34 -07:00
block ub: Bind to first endpoint, not to last 2007-04-27 13:28:34 -07:00
bluetooth
cdrom
char
clocksource
connector
cpufreq
crypto
dio
dma
edac
eisa
fc4
firmware
hid
hwmon
i2c
ide IDE: remove rwsem use from ide-proc core 2007-04-27 10:57:30 -07:00
ieee1394 IEEE1394: remove rwsem use from ieee1394 core 2007-04-27 10:57:30 -07:00
infiniband
input Input: gameport - do not touch bus's rwsem 2007-04-27 10:57:30 -07:00
isdn
kvm
leds
macintosh
mca
md
media V4L/DVB (5563): Radio-maestro.c Replace radio_ioctl to use video_ioctl2 2007-04-27 15:46:01 -03:00
message
mfd
misc
mmc uevent: use add_uevent_var() instead of open coding it 2007-04-27 10:57:29 -07:00
mtd [MTD] [MAPS] drivers/mtd/maps/ck804xrom.c: convert pci_module_init() 2007-04-27 23:34:21 +01:00
net sis900: Allocate rx replacement buffer before rx operation 2007-04-27 20:16:41 -04:00
nubus
oprofile
parisc
parport
pci libata/IDE: remove combined mode quirk 2007-04-28 14:15:59 -04:00
pcmcia
pnp PNP: stop using the subsystem rwsem 2007-04-27 10:57:30 -07:00
ps3
rapidio
rtc
s390 s390: cio: Delay uevents for subchannels 2007-04-27 10:57:32 -07:00
sbus
scsi git-libata-all-ipr-fix 2007-04-28 14:16:00 -04:00
serial
sh
sn
spi
tc
telephony
usb usb-net/pegasus: simplify carrier detection 2007-04-27 20:16:41 -04:00
video
w1
zorro
Kconfig
Makefile