Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Jeff Garzik <jeff@garzik.org>,
	IDE/ATA development list <linux-ide@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [PATCH] libata: use ATAPI dma even for data transfers not aligned to 16 bytes
Date: Mon, 16 Jun 2008 16:26:44 +0900	[thread overview]
Message-ID: <485615B4.7070002@kernel.org> (raw)

Most ATAPI DMA failures are due to controller issues including choking
on data buffer w/o proper padding or draining areas and should be
worked around in LLDs.  The default 16 byte alignment check in
ata_check_atapi_dma() only partially hides problems (well, that was
the conclusion back then, at least).

Now that ATAPI DMA support seems fairly stable.  Let's take the plunge
and verify the previous conclusion was correct.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
Jeff, Alan, as discussed before, the default 16 byte alignment check
doesn't make much sense if our previous conclusion was correct.  I
guess it's about time we put the theory to the test.  It'll be
probably best to put this in a separate branch and expose it through
-next and -mm only.

Thanks.

 drivers/ata/libata-core.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 52285f6..0d3d16c 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4325,12 +4325,6 @@ int ata_check_atapi_dma(struct ata_queued_cmd *qc)
 {
 	struct ata_port *ap = qc->ap;
 
-	/* Don't allow DMA if it isn't multiple of 16 bytes.  Quite a
-	 * few ATAPI devices choke on such DMA requests.
-	 */
-	if (unlikely(qc->nbytes & 15))
-		return 1;
-
 	if (ap->ops->check_atapi_dma)
 		return ap->ops->check_atapi_dma(qc);
 

             reply	other threads:[~2008-06-16  7:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-16  7:26 Tejun Heo [this message]
2008-06-16  9:31 ` [PATCH] libata: use ATAPI dma even for data transfers not aligned to 16 bytes Alan Cox

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=485615B4.7070002@kernel.org \
    --to=tj@kernel.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --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