diff options
author | Len Brown <len.brown@intel.com> | 2009-01-09 03:39:43 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-01-09 03:39:43 -0500 |
commit | b2576e1d4408e134e2188c967b1f28af39cd79d4 (patch) | |
tree | 004f3c82faab760f304ce031d6d2f572e7746a50 /drivers/ata/libata-acpi.c | |
parent | 3cc8a5f4ba91f67bbdb81a43a99281a26aab8d77 (diff) | |
parent | 2150edc6c5cf00f7adb54538b9ea2a3e9cedca3f (diff) |
Merge branch 'linus' into release
Diffstat (limited to 'drivers/ata/libata-acpi.c')
-rw-r--r-- | drivers/ata/libata-acpi.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 246987f0b88c..6273d98d00eb 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
@@ -83,7 +83,7 @@ void ata_acpi_associate_sata_port(struct ata_port *ap) | |||
83 | 83 | ||
84 | ap->link.device->acpi_handle = NULL; | 84 | ap->link.device->acpi_handle = NULL; |
85 | 85 | ||
86 | ata_port_for_each_link(link, ap) { | 86 | ata_for_each_link(link, ap, EDGE) { |
87 | acpi_integer adr = SATA_ADR(ap->port_no, link->pmp); | 87 | acpi_integer adr = SATA_ADR(ap->port_no, link->pmp); |
88 | 88 | ||
89 | link->device->acpi_handle = | 89 | link->device->acpi_handle = |
@@ -123,8 +123,8 @@ static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev) | |||
123 | struct ata_link *tlink; | 123 | struct ata_link *tlink; |
124 | struct ata_device *tdev; | 124 | struct ata_device *tdev; |
125 | 125 | ||
126 | ata_port_for_each_link(tlink, ap) | 126 | ata_for_each_link(tlink, ap, EDGE) |
127 | ata_link_for_each_dev(tdev, tlink) | 127 | ata_for_each_dev(tdev, tlink, ALL) |
128 | tdev->flags |= ATA_DFLAG_DETACH; | 128 | tdev->flags |= ATA_DFLAG_DETACH; |
129 | } | 129 | } |
130 | 130 | ||
@@ -582,12 +582,9 @@ int ata_acpi_cbl_80wire(struct ata_port *ap, const struct ata_acpi_gtm *gtm) | |||
582 | { | 582 | { |
583 | struct ata_device *dev; | 583 | struct ata_device *dev; |
584 | 584 | ||
585 | ata_link_for_each_dev(dev, &ap->link) { | 585 | ata_for_each_dev(dev, &ap->link, ENABLED) { |
586 | unsigned long xfer_mask, udma_mask; | 586 | unsigned long xfer_mask, udma_mask; |
587 | 587 | ||
588 | if (!ata_dev_enabled(dev)) | ||
589 | continue; | ||
590 | |||
591 | xfer_mask = ata_acpi_gtm_xfermask(dev, gtm); | 588 | xfer_mask = ata_acpi_gtm_xfermask(dev, gtm); |
592 | ata_unpack_xfermask(xfer_mask, NULL, NULL, &udma_mask); | 589 | ata_unpack_xfermask(xfer_mask, NULL, NULL, &udma_mask); |
593 | 590 | ||
@@ -887,7 +884,7 @@ void ata_acpi_on_resume(struct ata_port *ap) | |||
887 | * use values set by _STM. Cache _GTF result and | 884 | * use values set by _STM. Cache _GTF result and |
888 | * schedule _GTF. | 885 | * schedule _GTF. |
889 | */ | 886 | */ |
890 | ata_link_for_each_dev(dev, &ap->link) { | 887 | ata_for_each_dev(dev, &ap->link, ALL) { |
891 | ata_acpi_clear_gtf(dev); | 888 | ata_acpi_clear_gtf(dev); |
892 | if (ata_dev_enabled(dev) && | 889 | if (ata_dev_enabled(dev) && |
893 | ata_dev_get_GTF(dev, NULL) >= 0) | 890 | ata_dev_get_GTF(dev, NULL) >= 0) |
@@ -898,7 +895,7 @@ void ata_acpi_on_resume(struct ata_port *ap) | |||
898 | * there's no reason to evaluate IDE _GTF early | 895 | * there's no reason to evaluate IDE _GTF early |
899 | * without _STM. Clear cache and schedule _GTF. | 896 | * without _STM. Clear cache and schedule _GTF. |
900 | */ | 897 | */ |
901 | ata_link_for_each_dev(dev, &ap->link) { | 898 | ata_for_each_dev(dev, &ap->link, ALL) { |
902 | ata_acpi_clear_gtf(dev); | 899 | ata_acpi_clear_gtf(dev); |
903 | if (ata_dev_enabled(dev)) | 900 | if (ata_dev_enabled(dev)) |
904 | dev->flags |= ATA_DFLAG_ACPI_PENDING; | 901 | dev->flags |= ATA_DFLAG_ACPI_PENDING; |
@@ -926,8 +923,8 @@ void ata_acpi_set_state(struct ata_port *ap, pm_message_t state) | |||
926 | if (state.event == PM_EVENT_ON) | 923 | if (state.event == PM_EVENT_ON) |
927 | acpi_bus_set_power(ap->acpi_handle, ACPI_STATE_D0); | 924 | acpi_bus_set_power(ap->acpi_handle, ACPI_STATE_D0); |
928 | 925 | ||
929 | ata_link_for_each_dev(dev, &ap->link) { | 926 | ata_for_each_dev(dev, &ap->link, ENABLED) { |
930 | if (dev->acpi_handle && ata_dev_enabled(dev)) | 927 | if (dev->acpi_handle) |
931 | acpi_bus_set_power(dev->acpi_handle, | 928 | acpi_bus_set_power(dev->acpi_handle, |
932 | state.event == PM_EVENT_ON ? | 929 | state.event == PM_EVENT_ON ? |
933 | ACPI_STATE_D0 : ACPI_STATE_D3); | 930 | ACPI_STATE_D0 : ACPI_STATE_D3); |