All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Pat LaVarre <p.lavarre@ieee.org>
Cc: linux-ide@vger.kernel.org
Subject: Re: SATA ATAPI work in progress
Date: Fri, 14 May 2004 20:38:51 -0400	[thread overview]
Message-ID: <40A5669B.6080108@pobox.com> (raw)
In-Reply-To: <1084579362.3271.5.camel@patibmrh9>

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

Pat LaVarre wrote:
> Results follow.  Much improved now, yes?

Yep, that's definitely a Silicon Image bridge all right :)

Here's a better version of the patch you generated.

Next thing is to handle ATA_PROT_ATAPI_DMA in ata_host_intr...

	Jeff



[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2219 bytes --]

===== drivers/scsi/libata-core.c 1.57 vs edited =====
--- 1.57/drivers/scsi/libata-core.c	Thu May 13 22:45:55 2004
+++ edited/drivers/scsi/libata-core.c	Fri May 14 20:35:23 2004
@@ -1168,6 +1168,9 @@
 		if (ata_id_is_ata(dev))		/* sanity check */
 			goto err_out_nosup;
 
+		if (ata_id_use_dmadir(dev))
+			dev->flags |= ATA_DFLAG_DMADIR;
+
 		/* see if 16-byte commands supported */
 		tmp = dev->id[0] & 0x3;
 		if (tmp == 1)
===== drivers/scsi/libata-scsi.c 1.29 vs edited =====
--- 1.29/drivers/scsi/libata-scsi.c	Thu May 13 22:39:12 2004
+++ edited/drivers/scsi/libata-scsi.c	Fri May 14 20:36:28 2004
@@ -920,6 +920,9 @@
 		qc->flags |= ATA_QCFLAG_SG; /* data is present; dma-map it */
 		qc->tf.protocol = ATA_PROT_ATAPI_DMA;
 		qc->tf.feature |= ATAPI_PKT_DMA;
+		if ((qc->dev->flags & ATA_DFLAG_DMADIR) &&
+		    (cmd->sc_data_direction != SCSI_DATA_WRITE))
+			qc->tf.feature |= ATAPI_DMADIR;
 	}
 
 	return 0;
===== include/linux/ata.h 1.5 vs edited =====
--- 1.5/include/linux/ata.h	Mon May 10 21:49:59 2004
+++ edited/include/linux/ata.h	Fri May 14 20:34:17 2004
@@ -84,6 +84,8 @@
 	ATA_ERR			= (1 << 0),	/* have an error */
 	ATA_SRST		= (1 << 2),	/* software reset */
 	ATA_ABORTED		= (1 << 2),	/* command aborted */
+	ATAPI_DMADIR		= (1 << 2),	/* ATAPI data dir:
+						   0=to device, 1=to host */
 
 	/* ATA command block registers */
 	ATA_REG_DATA		= 0x00,
@@ -203,6 +205,7 @@
 #define ata_id_has_wcache(dev)	((dev)->id[82] & (1 << 5))
 #define ata_id_has_lba(dev)	((dev)->id[49] & (1 << 8))
 #define ata_id_has_dma(dev)	((dev)->id[49] & (1 << 9))
+#define ata_id_use_dmadir(dev)	((dev)->id[62] & (1 << 15))
 #define ata_id_u32(dev,n)	\
 	(((u32) (dev)->id[(n) + 1] << 16) | ((u32) (dev)->id[(n)]))
 #define ata_id_u64(dev,n)	\
===== include/linux/libata.h 1.29 vs edited =====
--- 1.29/include/linux/libata.h	Thu May 13 22:45:55 2004
+++ edited/include/linux/libata.h	Fri May 14 20:28:37 2004
@@ -90,6 +90,7 @@
 	ATA_DFLAG_MASTER	= (1 << 2), /* is device 0? */
 	ATA_DFLAG_WCACHE	= (1 << 3), /* has write cache we can
 					     * (hopefully) flush? */
+	ATA_DFLAG_DMADIR	= (1 << 4), /* use DMADIR bit in ATAPI */
 
 	ATA_DEV_UNKNOWN		= 0,	/* unknown device */
 	ATA_DEV_ATA		= 1,	/* ATA device */

  reply	other threads:[~2004-05-15  0:39 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-12 20:20 SATA ATAPI work in progress Pat LaVarre
2004-05-12 20:40 ` Jeff Garzik
2004-05-12 23:14   ` Pat LaVarre
2004-05-13 15:07     ` Pat LaVarre
2004-05-13 20:56       ` Jeff Garzik
2004-05-13 21:16     ` Jeff Garzik
2004-05-13 21:25       ` Jeff Garzik
2004-05-13 21:36         ` Pat LaVarre
2004-05-13 21:44           ` Jeff Garzik
2004-05-13 21:49             ` Jeff Garzik
2004-05-14 18:23       ` Pat LaVarre
2004-05-14 18:55         ` Jeff Garzik
2004-05-14 19:37           ` when limited to a single DRQ block per disk transaction Pat LaVarre
2004-05-14 19:50             ` Jeff Garzik
2004-05-14 20:12               ` Pat LaVarre
2004-05-14 23:47           ` SATA ATAPI work in progress Pat LaVarre
2004-05-15  0:02             ` Pat LaVarre
2004-05-15  0:38               ` Jeff Garzik [this message]
2004-05-15 13:06                 ` Pat LaVarre
2004-05-15 13:49                   ` Pat LaVarre
2004-05-15 15:27                     ` Jeff Garzik
2004-05-15 15:49                       ` Pat LaVarre
2004-05-15 15:56                         ` Pat LaVarre
2004-05-15 16:04                           ` Pat LaVarre
2004-05-15 16:32                             ` Jeff Garzik
2004-05-15 16:43                               ` Pat LaVarre
2004-05-15 16:50                                 ` Pat LaVarre
2004-05-15 16:30                         ` Jeff Garzik
2004-05-15  0:46               ` [PATCH] " Jeff Garzik
2004-05-15 13:08                 ` Pat LaVarre
2004-05-15 13:10                   ` Pat LaVarre
2004-05-15 14:13                     ` Pat LaVarre
2004-05-14 18:28       ` Pat LaVarre
2004-05-14 18:38         ` 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=40A5669B.6080108@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=p.lavarre@ieee.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 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.