]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[libata] acpi: call ata_acpi_gtm during ata port init time
authorAaron Lu <aaron.lu@intel.com>
Wed, 15 Aug 2012 09:08:12 +0000 (17:08 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 17 Aug 2012 17:29:27 +0000 (13:29 -0400)
Commit 30dcf76acc695cbd2fa919e294670fe9552e16e7 mistakenly dropped
the code to get an initial gtm for the IDE channel. This caused the
following problem for Sergei:
http://marc.info/?l=linux-kernel&m=134484963618457&w=2

Fix this by adding the call back in ata_acpi_bind_host, and due to
this, the ata_ap_acpi_handle is modified accordingly.

Tested-by: Sergei Trofimovich <slyich@gmail.com>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-acpi.c

index 902b5a457170958f4d805ae30185cee170e6b6e9..fd9ecf74e631afc800e56927069d97bd61774862 100644 (file)
@@ -60,17 +60,7 @@ acpi_handle ata_ap_acpi_handle(struct ata_port *ap)
        if (ap->flags & ATA_FLAG_ACPI_SATA)
                return NULL;
 
-       /*
-        * If acpi bind operation has already happened, we can get the handle
-        * for the port by checking the corresponding scsi_host device's
-        * firmware node, otherwise we will need to find out the handle from
-        * its parent's acpi node.
-        */
-       if (ap->scsi_host)
-               return DEVICE_ACPI_HANDLE(&ap->scsi_host->shost_gendev);
-       else
-               return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev),
-                               ap->port_no);
+       return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev), ap->port_no);
 }
 EXPORT_SYMBOL(ata_ap_acpi_handle);
 
@@ -1101,6 +1091,9 @@ static int ata_acpi_bind_host(struct ata_port *ap, acpi_handle *handle)
        if (!*handle)
                return -ENODEV;
 
+       if (ata_acpi_gtm(ap, &ap->__acpi_init_gtm) == 0)
+               ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
+
        return 0;
 }