aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorMatthew Garrett <mjg59@srcf.ucam.org>2007-11-08 13:37:07 -0500
committerJeff Garzik <jeff@garzik.org>2007-11-10 00:31:27 -0500
commit037f6bb79f753c014bc84bca0de9bf98bb5ab169 (patch)
treee6c43c00947fa0d097ae611a4051efa7afd2d06c /drivers/ata
parent32ebbc0c0d5d18c0135b55d1eb0029f48c54aff0 (diff)
libata: Don't fail device revalidation for bad _GTF methods
Experience suggests that the _GTF method may be bad. We currently fail device revalidation in that case, which seems excessive. Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-acpi.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 08a52dd45fb6..545ea865ceb5 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm);
312 * 312 *
313 * RETURNS: 313 * RETURNS:
314 * Number of taskfiles on success, 0 if _GTF doesn't exist or doesn't 314 * Number of taskfiles on success, 0 if _GTF doesn't exist or doesn't
315 * contain valid data. -errno on other errors. 315 * contain valid data.
316 */ 316 */
317static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf, 317static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
318 void **ptr_to_free) 318 void **ptr_to_free)
@@ -339,7 +339,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
339 ata_dev_printk(dev, KERN_WARNING, 339 ata_dev_printk(dev, KERN_WARNING,
340 "_GTF evaluation failed (AE 0x%x)\n", 340 "_GTF evaluation failed (AE 0x%x)\n",
341 status); 341 status);
342 rc = -EIO;
343 } 342 }
344 goto out_free; 343 goto out_free;
345 } 344 }
@@ -359,7 +358,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
359 ata_dev_printk(dev, KERN_WARNING, 358 ata_dev_printk(dev, KERN_WARNING,
360 "_GTF unexpected object type 0x%x\n", 359 "_GTF unexpected object type 0x%x\n",
361 out_obj->type); 360 out_obj->type);
362 rc = -EINVAL;
363 goto out_free; 361 goto out_free;
364 } 362 }
365 363
@@ -367,7 +365,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
367 ata_dev_printk(dev, KERN_WARNING, 365 ata_dev_printk(dev, KERN_WARNING,
368 "unexpected _GTF length (%d)\n", 366 "unexpected _GTF length (%d)\n",
369 out_obj->buffer.length); 367 out_obj->buffer.length);
370 rc = -EINVAL;
371 goto out_free; 368 goto out_free;
372 } 369 }
373 370
@@ -511,10 +508,7 @@ static int ata_acpi_exec_tfs(struct ata_device *dev)
511 int gtf_count, i, rc; 508 int gtf_count, i, rc;
512 509
513 /* get taskfiles */ 510 /* get taskfiles */
514 rc = ata_dev_get_GTF(dev, &gtf, &ptr_to_free); 511 gtf_count = ata_dev_get_GTF(dev, &gtf, &ptr_to_free);
515 if (rc < 0)
516 return rc;
517 gtf_count = rc;
518 512
519 /* execute them */ 513 /* execute them */
520 for (i = 0, rc = 0; i < gtf_count; i++) { 514 for (i = 0, rc = 0; i < gtf_count; i++) {