]> git.baikalelectronics.ru Git - kernel.git/commit
libata: check SATA_SETTINGS log with HW Feature Ctrl
authorShane Huang <shane.huang@amd.com>
Sat, 17 Nov 2012 20:44:41 +0000 (04:44 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 3 Dec 2012 09:57:37 +0000 (04:57 -0500)
commita1a8460c8fb75e2e890abdb24b0373c77b39ea90
tree0a5f7196d4026847fcfa26ecb04389975e8abe9e
parenta7e1fb282e39755e409c213302f6f3803e87cf21
libata: check SATA_SETTINGS log with HW Feature Ctrl

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) should be used.

Quoting SATA spec 3.1:
If Hardware Feature Control is supported, then:
a) IDENTIFY DEVICE data word 78 bit 5 (see 13.2.1.18) shall be
set to one;
b) the SET FEATURES Select Hardware Feature Control subcommand
shall be supported (see 13.3.8);
c) page 08h of the Identify Device Data log (see 13.7.7) shall
be supported;

This patch is not tested on SATA HDD with DevSlp supported.

Reported-by: Borislav Petkov <bp@amd64.org>
Signed-off-by: Shane Huang <shane.huang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c
include/linux/ata.h