linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 3/4] libata: prepare ata_sg_clean() for invocation from EH
Date: Tue, 14 Nov 2006 22:47:10 +0900	[thread overview]
Message-ID: <11635120303659-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <1163512029469-git-send-email-htejun@gmail.com>

Make ata_sg_clean() global and don't allow NCQ for internal commands.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---
 drivers/ata/libata-core.c |    6 +++---
 drivers/ata/libata.h      |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 1b33f05..9688bbf 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -309,7 +309,8 @@ int ata_build_tf(struct ata_taskfile *tf
 	tf->flags |= tf_flags;
 
 	if ((dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF |
-			   ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ) {
+			   ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ &&
+	    likely(tag != ATA_TAG_INTERNAL)) {
 		/* yay, NCQ */
 		if (!lba_48_ok(block, n_block))
 			return -ERANGE;
@@ -3517,8 +3518,7 @@ static unsigned int ata_dev_init_params(
  *	LOCKING:
  *	spin_lock_irqsave(host lock)
  */
-
-static void ata_sg_clean(struct ata_queued_cmd *qc)
+void ata_sg_clean(struct ata_queued_cmd *qc)
 {
 	struct ata_port *ap = qc->ap;
 	struct scatterlist *sg = qc->__sg;
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index d4791e7..c0f27c3 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -66,6 +66,7 @@ extern int sata_down_spd_limit(struct at
 extern int sata_set_spd_needed(struct ata_port *ap);
 extern int ata_down_xfermask_limit(struct ata_device *dev, int force_pio0);
 extern int ata_set_mode(struct ata_port *ap, struct ata_device **r_failed_dev);
+extern void ata_sg_clean(struct ata_queued_cmd *qc);
 extern void ata_qc_free(struct ata_queued_cmd *qc);
 extern void ata_qc_issue(struct ata_queued_cmd *qc);
 extern void __ata_qc_complete(struct ata_queued_cmd *qc);
-- 
1.4.3.3



  parent reply	other threads:[~2006-11-14 13:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-14 13:47 [PATCHSET] libata: improve media error handling Tejun Heo
2006-11-14 13:47 ` [PATCH 1/4] libata: implement ata_exec_internal_sg() Tejun Heo
2006-11-28  9:02   ` Jeff Garzik
2006-11-14 13:47 ` Tejun Heo [this message]
2006-11-28  9:02   ` [PATCH 3/4] libata: prepare ata_sg_clean() for invocation from EH Jeff Garzik
2006-11-14 13:47 ` [PATCH 2/4] libata: separate out rw ATA taskfile building into ata_build_tf() Tejun Heo
2006-11-14 16:13   ` Mark Lord
2006-11-14 16:51     ` Tejun Heo
2006-11-14 21:04       ` Mark Lord
2006-11-28  9:17   ` Jeff Garzik
2006-11-14 13:47 ` [PATCH 4/4] libata: improve media error handling Tejun Heo
2007-03-02 23:37   ` Jeff Garzik

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=11635120303659-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /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).