]> git.baikalelectronics.ru Git - kernel.git/commit
libata: restore SControl on detach
authorTejun Heo <tj@kernel.org>
Thu, 31 Jul 2008 07:09:34 +0000 (16:09 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 22 Aug 2008 06:19:46 +0000 (02:19 -0400)
commitdbfac47f5e7229cb1251dbc63c9b01cb81b654be
tree2edbaf46167c86faad6b7645f3d3d2ef52bba84a
parent40d8c8f90c1239c6a03a87c991bf2d8f846a593c
libata: restore SControl on detach

Save SControl during probing and restore it on detach.  This prevents
adjustments made by libata drivers to seep into the next driver which
gets attached (be it a libata one or not).

It's not clear whether SControl also needs to be restored on suspend.
The next system to have control (ACPI or kexec'd kernel) would
probably like to see the original SControl value but there's no
guarantee that a link is gonna keep working after SControl is adjusted
without a reset and adding a reset and modified recovery cycle soley
for this is an overkill.  For now, do it only for detach.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c
include/linux/libata.h