]> git.hungrycats.org Git - linux/commit
libata: replace sata_settings with devslp_timing
authorShane Huang <shane.huang@amd.com>
Mon, 17 Dec 2012 15:18:59 +0000 (23:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jan 2013 04:48:59 +0000 (20:48 -0800)
commita71e051a8e26f3cbcb200cefed0398ee300a4c19
tree725c8802b7d4fda0e5735ab428a3b9833807c823
parent2f3e145dc36d228997d22e9871615f74b2b06b91
libata: replace sata_settings with devslp_timing

commit 803739d25c2343da6d2f95eebdcbc08bf67097d4 upstream.

NCQ capability was used to check availability of SATA Settings page
from Identify Device Data Log, which contains DevSlp timing variables.
It does not work on some HDDs and leads to error messages.

IDENTIFY word 78 bit 5(Hardware Feature Control) can't work either
because it is only the sufficient condition of Identify Device data
log, not the necessary condition.

This patch replaced ata_device->sata_settings with ->devslp_timing
to only save DevSlp timing variables(8 bytes), instead of the whole
SATA Settings page(512 bytes).

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=51881

Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Shane Huang <shane.huang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/ata/libahci.c
drivers/ata/libata-core.c
include/linux/ata.h
include/linux/libata.h