diff options
author | Tejun Heo <tj@kernel.org> | 2009-11-18 08:24:21 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-12-03 02:46:33 -0500 |
commit | f2406770a2f62a3d3c0a6f45c2f397b368af668d (patch) | |
tree | 15f0a51a7fdbc2e29d66d50196b52436d9f22c9e | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
libata-acpi: missing _SDD is not an error
Missing _SDD is not an error. Don't treat it as one.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-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 | ||