linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jeff Garzik <jeff@garzik.org>,
	roppedisano@infracomspa.it, linux-kernel@vger.kernel.org,
	linux-ide@vger.kernel.org, rjw@sisk.pl,
	linux-acpi@vger.kernel.org
Subject: [PATCH] Don't fail ata device revalidation for bad _GTF methods
Date: Thu, 8 Nov 2007 18:37:07 +0000	[thread overview]
Message-ID: <20071108183707.GA3008@srcf.ucam.org> (raw)
In-Reply-To: <20071108182217.GA2685@srcf.ucam.org>

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>

---

diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 08a52dd..545ea86 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -312,7 +312,7 @@ EXPORT_SYMBOL_GPL(ata_acpi_stm);
  *
  * RETURNS:
  * Number of taskfiles on success, 0 if _GTF doesn't exist or doesn't
- * contain valid data.  -errno on other errors.
+ * contain valid data.
  */
 static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 			   void **ptr_to_free)
@@ -339,7 +339,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 			ata_dev_printk(dev, KERN_WARNING,
 				       "_GTF evaluation failed (AE 0x%x)\n",
 				       status);
-			rc = -EIO;
 		}
 		goto out_free;
 	}
@@ -359,7 +358,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 		ata_dev_printk(dev, KERN_WARNING,
 			       "_GTF unexpected object type 0x%x\n",
 			       out_obj->type);
-		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -367,7 +365,6 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf,
 		ata_dev_printk(dev, KERN_WARNING,
 			       "unexpected _GTF length (%d)\n",
 			       out_obj->buffer.length);
-		rc = -EINVAL;
 		goto out_free;
 	}
 
@@ -511,10 +508,7 @@ static int ata_acpi_exec_tfs(struct ata_device *dev)
 	int gtf_count, i, rc;
 
 	/* get taskfiles */
-	rc = ata_dev_get_GTF(dev, &gtf, &ptr_to_free);
-	if (rc < 0)
-		return rc;
-	gtf_count = rc;
+	gtf_count = ata_dev_get_GTF(dev, &gtf, &ptr_to_free);
 
 	/* execute them */
 	for (i = 0, rc = 0; i < gtf_count; i++) {

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2007-11-08 18:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4731C86B.1040704@infracomspa.it>
2007-11-07 20:13 ` libata: cdrw/dvdrom disabed after s2ram (2.6.24-rc2) Andrew Morton
2007-11-08 16:43   ` Roberto Oppedisano
2007-11-08 17:49     ` Andrew Morton
2007-11-08 18:02       ` Jeff Garzik
2007-11-08 18:13         ` Andrew Morton
2007-11-08 18:19           ` Jeff Garzik
2007-11-08 19:02             ` Andrew Morton
2007-11-08 19:49               ` Mark Lord
2007-11-08 19:58                 ` Andrew Morton
2007-11-08 18:22           ` Matthew Garrett
2007-11-08 18:37             ` Matthew Garrett [this message]
2007-11-09 12:29               ` [PATCH] Don't fail ata device revalidation for bad _GTF methods Roberto Oppedisano
2007-11-10  5:32               ` Jeff Garzik
2007-11-09 15:48         ` libata: cdrw/dvdrom disabed after s2ram (2.6.24-rc2) Roberto Oppedisano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071108183707.GA3008@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=akpm@linux-foundation.org \
    --cc=jeff@garzik.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=roppedisano@infracomspa.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).