Commit f2406770 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

libata-acpi: missing _SDD is not an error

Missing _SDD is not an error.  Don't treat it as one.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 22763c5c
...@@ -807,12 +807,11 @@ static int ata_acpi_exec_tfs(struct ata_device *dev, int *nr_executed) ...@@ -807,12 +807,11 @@ static int ata_acpi_exec_tfs(struct ata_device *dev, int *nr_executed)
* EH context. * EH context.
* *
* RETURNS: * RETURNS:
* 0 on success, -errno on failure. * 0 on success, -ENOENT if _SDD doesn't exist, -errno on failure.
*/ */
static int ata_acpi_push_id(struct ata_device *dev) static int ata_acpi_push_id(struct ata_device *dev)
{ {
struct ata_port *ap = dev->link->ap; struct ata_port *ap = dev->link->ap;
int err;
acpi_status status; acpi_status status;
struct acpi_object_list input; struct acpi_object_list input;
union acpi_object in_params[1]; union acpi_object in_params[1];
...@@ -835,12 +834,16 @@ static int ata_acpi_push_id(struct ata_device *dev) ...@@ -835,12 +834,16 @@ static int ata_acpi_push_id(struct ata_device *dev)
status = acpi_evaluate_object(dev->acpi_handle, "_SDD", &input, NULL); status = acpi_evaluate_object(dev->acpi_handle, "_SDD", &input, NULL);
swap_buf_le16(dev->id, ATA_ID_WORDS); swap_buf_le16(dev->id, ATA_ID_WORDS);
err = ACPI_FAILURE(status) ? -EIO : 0; if (status == AE_NOT_FOUND)
if (err < 0) return -ENOENT;
if (ACPI_FAILURE(status)) {
ata_dev_printk(dev, KERN_WARNING, ata_dev_printk(dev, KERN_WARNING,
"ACPI _SDD failed (AE 0x%x)\n", status); "ACPI _SDD failed (AE 0x%x)\n", status);
return -EIO;
}
return err; return 0;
} }
/** /**
...@@ -971,7 +974,7 @@ int ata_acpi_on_devcfg(struct ata_device *dev) ...@@ -971,7 +974,7 @@ int ata_acpi_on_devcfg(struct ata_device *dev)
/* do _SDD if SATA */ /* do _SDD if SATA */
if (acpi_sata) { if (acpi_sata) {
rc = ata_acpi_push_id(dev); rc = ata_acpi_push_id(dev);
if (rc) if (rc && rc != -ENOENT)
goto acpi_err; goto acpi_err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment