diff options
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 | ||