* [PATCH #upstream-fixes] libata-acpi: filter out DIPM enable
@ 2008-07-06 14:15 Tejun Heo
2008-07-06 15:25 ` Alan Cox
2008-07-11 13:38 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2008-07-06 14:15 UTC (permalink / raw)
To: Jeff Garzik, IDE/ATA development list, Mathieu Bérard
Some BIOSen enable DIPM via _GTF which causes command timeouts under
certain configuration. This didn't occur on 2.6.25 because 2.6.25
defaulted to SRST, so _GTF wasn't executed during boot probe, so ahci
host reset disabled DIPM and as _GTF wasn't executed after SRST, DIPM
wasn't enabled. On 2.6.26, hardreset is used during probe and after
probe _GTF is executed enabling DIPM and thus the failures.
This patch could theoretically disable DIPM on machines which used to
have it enabled on 2.6.25 but AFAIK ahci is currently the only driver
which uses SATA ACPI hierarchy (_SDD) and as the host reset would have
always disabled DIPM, this shouldn't happen.
Signed-off-by: Tejun Heo <tj@kernel.org>
---
drivers/ata/libata-acpi.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 3ff8b14..abea74b 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -29,14 +29,16 @@
enum {
ATA_ACPI_FILTER_SETXFER = 1 << 0,
ATA_ACPI_FILTER_LOCK = 1 << 1,
+ ATA_ACPI_FILTER_DIPM = 1 << 2,
ATA_ACPI_FILTER_DEFAULT = ATA_ACPI_FILTER_SETXFER |
- ATA_ACPI_FILTER_LOCK,
+ ATA_ACPI_FILTER_LOCK |
+ ATA_ACPI_FILTER_DIPM,
};
static unsigned int ata_acpi_gtf_filter = ATA_ACPI_FILTER_DEFAULT;
module_param_named(acpi_gtf_filter, ata_acpi_gtf_filter, int, 0644);
-MODULE_PARM_DESC(acpi_gtf_filter, "filter mask for ACPI _GTF commands, set to filter out (0x1=set xfermode, 0x2=lock/freeze lock)");
+MODULE_PARM_DESC(acpi_gtf_filter, "filter mask for ACPI _GTF commands, set to filter out (0x1=set xfermode, 0x2=lock/freeze lock, 0x4=DIPM)");
#define NO_PORT_MULT 0xffff
#define SATA_ADR(root, pmp) (((root) << 16) | (pmp))
@@ -690,6 +692,14 @@ static int ata_acpi_filter_tf(const struct ata_taskfile *tf,
return 1;
}
+ if (ata_acpi_gtf_filter & ATA_ACPI_FILTER_DIPM) {
+ /* inhibit enabling DIPM */
+ if (tf->command == ATA_CMD_SET_FEATURES &&
+ tf->feature == SETFEATURES_SATA_ENABLE &&
+ tf->nsect == SATA_DIPM)
+ return 1;
+ }
+
return 0;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH #upstream-fixes] libata-acpi: filter out DIPM enable
2008-07-06 14:15 [PATCH #upstream-fixes] libata-acpi: filter out DIPM enable Tejun Heo
@ 2008-07-06 15:25 ` Alan Cox
2008-07-11 13:38 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2008-07-06 15:25 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, IDE/ATA development list, Mathieu Bérard
On Sun, 06 Jul 2008 23:15:03 +0900
Tejun Heo <tj@kernel.org> wrote:
> Some BIOSen enable DIPM via _GTF which causes command timeouts under
> certain configuration. This didn't occur on 2.6.25 because 2.6.25
> defaulted to SRST, so _GTF wasn't executed during boot probe, so ahci
> host reset disabled DIPM and as _GTF wasn't executed after SRST, DIPM
> wasn't enabled. On 2.6.26, hardreset is used during probe and after
> probe _GTF is executed enabling DIPM and thus the failures.
>
> This patch could theoretically disable DIPM on machines which used to
> have it enabled on 2.6.25 but AFAIK ahci is currently the only driver
> which uses SATA ACPI hierarchy (_SDD) and as the host reset would have
> always disabled DIPM, this shouldn't happen.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Alan Cox <alan@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH #upstream-fixes] libata-acpi: filter out DIPM enable
2008-07-06 14:15 [PATCH #upstream-fixes] libata-acpi: filter out DIPM enable Tejun Heo
2008-07-06 15:25 ` Alan Cox
@ 2008-07-11 13:38 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2008-07-11 13:38 UTC (permalink / raw)
To: Tejun Heo; +Cc: IDE/ATA development list, Mathieu Bérard
Tejun Heo wrote:
> Some BIOSen enable DIPM via _GTF which causes command timeouts under
> certain configuration. This didn't occur on 2.6.25 because 2.6.25
> defaulted to SRST, so _GTF wasn't executed during boot probe, so ahci
> host reset disabled DIPM and as _GTF wasn't executed after SRST, DIPM
> wasn't enabled. On 2.6.26, hardreset is used during probe and after
> probe _GTF is executed enabling DIPM and thus the failures.
>
> This patch could theoretically disable DIPM on machines which used to
> have it enabled on 2.6.25 but AFAIK ahci is currently the only driver
> which uses SATA ACPI hierarchy (_SDD) and as the host reset would have
> always disabled DIPM, this shouldn't happen.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> ---
> drivers/ata/libata-acpi.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-11 13:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-06 14:15 [PATCH #upstream-fixes] libata-acpi: filter out DIPM enable Tejun Heo
2008-07-06 15:25 ` Alan Cox
2008-07-11 13:38 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).