diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 11:18:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 11:18:01 -0500 |
commit | 23eb3b64b5e44680c867e165fe1cd18e57fba255 (patch) | |
tree | d6aed2971ef647f7be2986353f830577abd1fab9 /drivers/ata/libata-acpi.c | |
parent | 1c496784a0d317535f846ddb2c93a08ba936266b (diff) | |
parent | 1b52f2a41c41052d2a7c78af0bd9b8b11d70f49a (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (54 commits)
Revert "pata_sis: Implement MWDMA for the UDMA 133 capable chips"
libata: Clarify ata_set_lba_range_entries function
libata: Report zeroed read after TRIM and max discard size
pata_hpt3x2n: fix overclocked MWDMA0 timing
pata_it8213: MWDMA0 is unsupported
[libata] MWDMA0 is unsupported on PIIX-like PATA controllers
pata_via: clear UDMA transfer mode bit for PIO and MWDMA
pata_sis: Power Management fix
pata_rz1000: Power Management fix
pata_radisys: fix UDMA handling
pata_ns87415: Power Management fix
pata_marvell: fix marvell_pre_reset() documentation
pata_legacy: add pointers to QDI65x0 documentation
pata_legacy: fix access to control register for QDI6580
pata_legacy: fix QDI6580DP support
pata_it8213: fix it8213_pre_reset() documentation
pata_it8213: fix wrong MWDMA timings being programmed
pata_it8213: fix PIO2 underclocking
pata_it8213: fix wrong PIO timings being programmed
pata_it8213: fix UDMA handling
...
Diffstat (limited to 'drivers/ata/libata-acpi.c')
-rw-r--r-- | drivers/ata/libata-acpi.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index b0882cddfd4c..1245838ac13d 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
@@ -807,12 +807,11 @@ static int ata_acpi_exec_tfs(struct ata_device *dev, int *nr_executed) | |||
807 | * EH context. | 807 | * EH context. |
808 | * | 808 | * |
809 | * RETURNS: | 809 | * RETURNS: |
810 | * 0 on success, -errno on failure. | 810 | * 0 on success, -ENOENT if _SDD doesn't exist, -errno on failure. |
811 | */ | 811 | */ |
812 | static int ata_acpi_push_id(struct ata_device *dev) | 812 | static int ata_acpi_push_id(struct ata_device *dev) |
813 | { | 813 | { |
814 | struct ata_port *ap = dev->link->ap; | 814 | struct ata_port *ap = dev->link->ap; |
815 | int err; | ||
816 | acpi_status status; | 815 | acpi_status status; |
817 | struct acpi_object_list input; | 816 | struct acpi_object_list input; |
818 | union acpi_object in_params[1]; | 817 | union acpi_object in_params[1]; |
@@ -835,12 +834,16 @@ static int ata_acpi_push_id(struct ata_device *dev) | |||
835 | status = acpi_evaluate_object(dev->acpi_handle, "_SDD", &input, NULL); | 834 | status = acpi_evaluate_object(dev->acpi_handle, "_SDD", &input, NULL); |
836 | swap_buf_le16(dev->id, ATA_ID_WORDS); | 835 | swap_buf_le16(dev->id, ATA_ID_WORDS); |
837 | 836 | ||
838 | err = ACPI_FAILURE(status) ? -EIO : 0; | 837 | if (status == AE_NOT_FOUND) |
839 | if (err < 0) | 838 | return -ENOENT; |
839 | |||
840 | if (ACPI_FAILURE(status)) { | ||
840 | ata_dev_printk(dev, KERN_WARNING, | 841 | ata_dev_printk(dev, KERN_WARNING, |
841 | "ACPI _SDD failed (AE 0x%x)\n", status); | 842 | "ACPI _SDD failed (AE 0x%x)\n", status); |
843 | return -EIO; | ||
844 | } | ||
842 | 845 | ||
843 | return err; | 846 | return 0; |
844 | } | 847 | } |
845 | 848 | ||
846 | /** | 849 | /** |
@@ -971,7 +974,7 @@ int ata_acpi_on_devcfg(struct ata_device *dev) | |||
971 | /* do _SDD if SATA */ | 974 | /* do _SDD if SATA */ |
972 | if (acpi_sata) { | 975 | if (acpi_sata) { |
973 | rc = ata_acpi_push_id(dev); | 976 | rc = ata_acpi_push_id(dev); |
974 | if (rc) | 977 | if (rc && rc != -ENOENT) |
975 | goto acpi_err; | 978 | goto acpi_err; |
976 | } | 979 | } |
977 | 980 | ||