From 2db05ea8cd838e2626abb876f6ff49a408d765d6 Mon Sep 17 00:00:00 2001 From: Aaron Lu Date: Mon, 26 Nov 2012 13:55:25 +0800 Subject: [PATCH] --- yaml --- r: 344418 b: refs/heads/master c: 0d0cdb028f9d9771e2b346038707734121f906e3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/ata/libata-acpi.c | 4 ++++ trunk/include/linux/libata.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5e095df2dc09..d87dedf6905b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a52f514c911978dee418f19d1d0103e3bc25fa62 +refs/heads/master: 0d0cdb028f9d9771e2b346038707734121f906e3 diff --git a/trunk/drivers/ata/libata-acpi.c b/trunk/drivers/ata/libata-acpi.c index 5b0ba3f20edc..ef01ac07502e 100644 --- a/trunk/drivers/ata/libata-acpi.c +++ b/trunk/drivers/ata/libata-acpi.c @@ -76,6 +76,9 @@ acpi_handle ata_dev_acpi_handle(struct ata_device *dev) acpi_integer adr; struct ata_port *ap = dev->link->ap; + if (dev->flags & ATA_DFLAG_ACPI_DISABLED) + return NULL; + if (ap->flags & ATA_FLAG_ACPI_SATA) { if (!sata_pmp_attached(ap)) adr = SATA_ADR(ap->port_no, NO_PORT_MULT); @@ -945,6 +948,7 @@ int ata_acpi_on_devcfg(struct ata_device *dev) return rc; } + dev->flags |= ATA_DFLAG_ACPI_DISABLED; ata_dev_warn(dev, "ACPI: failed the second time, disabled\n"); /* We can safely continue if no _GTF command has been executed diff --git a/trunk/include/linux/libata.h b/trunk/include/linux/libata.h index 77eeeda2b6e2..e931c9ad1078 100644 --- a/trunk/include/linux/libata.h +++ b/trunk/include/linux/libata.h @@ -163,6 +163,7 @@ enum { ATA_DFLAG_DA = (1 << 26), /* device supports Device Attention */ ATA_DFLAG_DEVSLP = (1 << 27), /* device supports Device Sleep */ + ATA_DFLAG_ACPI_DISABLED = (1 << 28), /* ACPI for the device is disabled */ ATA_DEV_UNKNOWN = 0, /* unknown device */ ATA_DEV_ATA = 1, /* ATA device */