Skip to content

Commit

Permalink
ata-acpi: don't call _GTF for disabled drive
Browse files Browse the repository at this point in the history
I got below log after a S3 resume in a ASUS A6VC laptop. The system has
only one IDE drive. It appears there is no reason calling _GTF for
disabled drive.

ACPI Error (dsopcode-0483): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node df822a7c), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN1.DRV0._GTF] (Node df822bd0), AE_AML_OPERAND_VALUE
ata2.00: _GTF evaluation failed (AE 0x3006)
ACPI Error (dsopcode-0483): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node df822a7c), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN1.DRV1._GTF] (Node df822b94), AE_AML_OPERAND_VALUE
ata2.01: _GTF evaluation failed (AE 0x3006)

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Shaohua Li authored and Jeff Garzik committed Apr 17, 2008
1 parent 094e50b commit 48feb3c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/ata/libata-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,8 @@ void ata_acpi_on_resume(struct ata_port *ap)
*/
ata_link_for_each_dev(dev, &ap->link) {
ata_acpi_clear_gtf(dev);
if (ata_dev_get_GTF(dev, NULL) >= 0)
if (ata_dev_enabled(dev) &&
ata_dev_get_GTF(dev, NULL) >= 0)
dev->flags |= ATA_DFLAG_ACPI_PENDING;
}
} else {
Expand All @@ -849,7 +850,8 @@ void ata_acpi_on_resume(struct ata_port *ap)
*/
ata_link_for_each_dev(dev, &ap->link) {
ata_acpi_clear_gtf(dev);
dev->flags |= ATA_DFLAG_ACPI_PENDING;
if (ata_dev_enabled(dev))
dev->flags |= ATA_DFLAG_ACPI_PENDING;
}
}
}
Expand Down

0 comments on commit 48feb3c

Please sign in to comment.