All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: IDE Linux <linux-ide@vger.kernel.org>,
	Doug Maxey <dwm@bebe.enoyolf.org>,
	Unicorn Chang <uchang@tw.ibm.com>
Subject: [PATCH 1/1] libata-dev: move the CDB-intr DMA blacklisting
Date: Thu, 22 Jun 2006 13:00:25 +0800	[thread overview]
Message-ID: <449A23E9.9060907@tw.ibm.com> (raw)

Move the DMA blacklisting of the CDB-intr devices
from ata_check_atapi_dma() to ata_dma_blacklisted(), where it makes more sense.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
---

Patch against upstream branch (d7a80dad2fe19a2b8c119c8e9cba605474a75a2b).
For your review, thanks.

--- upstream0/drivers/scsi/libata-core.c	2006-06-22 11:27:14.000000000 +0800
+++ upstream1/drivers/scsi/libata-core.c	2006-06-22 11:47:17.000000000 +0800
@@ -2943,6 +2943,14 @@ static int ata_dma_blacklisted(const str
 	unsigned int nlen, rlen;
 	int i;
 
+	/* We don't support polling DMA.
+	 * DMA blacklist those ATAPI devices with CDB-intr (and use PIO)
+	 * if the LLDD handles only interrupts in the HSM_ST_LAST state.
+	 */
+	if ((dev->ap->flags & ATA_FLAG_PIO_POLLING) &&
+	    (dev->flags & ATA_DFLAG_CDB_INTR))
+		return 1;
+
 	ata_id_string(dev->id, model_num, ATA_ID_PROD_OFS,
 			  sizeof(model_num));
 	ata_id_string(dev->id, model_rev, ATA_ID_FW_REV_OFS,
@@ -3235,15 +3243,6 @@ int ata_check_atapi_dma(struct ata_queue
 	if (ap->ops->check_atapi_dma)
 		rc = ap->ops->check_atapi_dma(qc);
 
-	/* We don't support polling DMA.
-	 * Use PIO if the LLDD handles only interrupts in
-	 * the HSM_ST_LAST state and the ATAPI device
-	 * generates CDB interrupts.
-	 */
-	if ((ap->flags & ATA_FLAG_PIO_POLLING) &&
-	    (qc->dev->flags & ATA_DFLAG_CDB_INTR))
-		rc = 1;
-
 	return rc;
 }
 /**
@@ -4551,7 +4550,7 @@ unsigned int ata_qc_issue_prot(struct at
 			break;
 		case ATA_PROT_ATAPI_DMA:
 			if (qc->dev->flags & ATA_DFLAG_CDB_INTR)
-				/* see ata_check_atapi_dma() */
+				/* see ata_dma_blacklisted() */
 				BUG();
 			break;
 		default:


             reply	other threads:[~2006-06-22  5:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22  5:00 Albert Lee [this message]
2006-06-23  3:26 ` [PATCH 1/1] libata-dev: move the CDB-intr DMA blacklisting 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=449A23E9.9060907@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=albertl@mail.com \
    --cc=dwm@bebe.enoyolf.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=uchang@tw.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.