mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
da0e21d3fa
commit
d127ea7b86
2 changed files with 6 additions and 5 deletions
|
@ -647,6 +647,7 @@ struct ata_link {
|
|||
|
||||
unsigned int flags; /* ATA_LFLAG_xxx */
|
||||
|
||||
u32 saved_scontrol; /* SControl on probe */
|
||||
unsigned int hw_sata_spd_limit;
|
||||
unsigned int sata_spd_limit;
|
||||
unsigned int sata_spd; /* current SATA PHY speed */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue