linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] libata atapi work #5
@ 2004-05-14 18:42 Pat LaVarre
  2004-05-14 19:09 ` Jeff Garzik
  0 siblings, 1 reply; 12+ messages in thread
From: Pat LaVarre @ 2004-05-14 18:42 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide

> -				if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0))
> +				if (qc && (!(qc->tf.ctl & ATA_NIEN)))
> ...
> -	ATA_QCFLAG_POLL		= (1 << 5), /* polling, no interrupts */

Back in PATA, when I set x02 ATA_NIEN, I mis/remember I saw INTRQ float,
rather than becoming reliably deasserted.

Is life better in SATA?

Pat LaVarre



^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH] libata atapi work #5
@ 2004-05-14 18:26 Jeff Garzik
  0 siblings, 0 replies; 12+ messages in thread
From: Jeff Garzik @ 2004-05-14 18:26 UTC (permalink / raw)
  To: linux-ide

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

attached.

[-- Attachment #2: patch.5 --]
[-- Type: text/plain, Size: 2795 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/05/13 22:46:01-04:00 jgarzik@redhat.com 
#   [libata] kill ATA_QCFLAG_POLL flag
#   
#   The standard ATA bit nIEN in the Device Control register serves as
#   the indicator for whether we are polling or not.  As it mirrors
#   ATA_QCFLAG_POLL completely, eliminate that in favor of testing
#   ATA_NIEN bit.
# 
diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c	Fri May 14 14:24:25 2004
+++ b/drivers/scsi/libata-core.c	Fri May 14 14:24:25 2004
@@ -2733,7 +2733,7 @@
 			struct ata_queued_cmd *qc;
 
 			qc = ata_qc_from_tag(ap, ap->active_tag);
-			if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0))
+			if (qc && (!(qc->tf.ctl & ATA_NIEN)))
 				handled += ata_host_intr(ap, qc);
 		}
 	}
diff -Nru a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
--- a/drivers/scsi/sata_promise.c	Fri May 14 14:24:25 2004
+++ b/drivers/scsi/sata_promise.c	Fri May 14 14:24:25 2004
@@ -421,7 +421,7 @@
 			struct ata_queued_cmd *qc;
 
 			qc = ata_qc_from_tag(ap, ap->active_tag);
-			if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0))
+			if (qc && (!(qc->tf.ctl & ATA_NIEN)))
 				handled += pdc_host_intr(ap, qc);
 		}
 	}
diff -Nru a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c
--- a/drivers/scsi/sata_sx4.c	Fri May 14 14:24:25 2004
+++ b/drivers/scsi/sata_sx4.c	Fri May 14 14:24:25 2004
@@ -748,7 +748,7 @@
 			struct ata_queued_cmd *qc;
 
 			qc = ata_qc_from_tag(ap, ap->active_tag);
-			if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0))
+			if (qc && (!(qc->tf.ctl & ATA_NIEN)))
 				handled += pdc20621_host_intr(ap, qc, (i > 4),
 							      mmio_base);
 		}
diff -Nru a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c
--- a/drivers/scsi/sata_vsc.c	Fri May 14 14:24:25 2004
+++ b/drivers/scsi/sata_vsc.c	Fri May 14 14:24:25 2004
@@ -175,7 +175,7 @@
 				struct ata_queued_cmd *qc;
 
 				qc = ata_qc_from_tag(ap, ap->active_tag);
-				if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0))
+				if (qc && (!(qc->tf.ctl & ATA_NIEN)))
 					handled += ata_host_intr(ap, qc);
 			}
 		}
diff -Nru a/include/linux/libata.h b/include/linux/libata.h
--- a/include/linux/libata.h	Fri May 14 14:24:25 2004
+++ b/include/linux/libata.h	Fri May 14 14:24:25 2004
@@ -112,7 +112,6 @@
 	ATA_QCFLAG_DMA		= (1 << 2), /* data delivered via DMA */
 	ATA_QCFLAG_ATAPI	= (1 << 3), /* is ATAPI packet command? */
 	ATA_QCFLAG_SG		= (1 << 4), /* have s/g table? */
-	ATA_QCFLAG_POLL		= (1 << 5), /* polling, no interrupts */
 
 	/* various lengths of time */
 	ATA_TMOUT_EDD		= 5 * HZ,	/* hueristic */
@@ -483,7 +482,6 @@
 
 static inline void ata_qc_set_polling(struct ata_queued_cmd *qc)
 {
-	qc->flags |= ATA_QCFLAG_POLL;
 	qc->flags &= ~ATA_QCFLAG_DMA;
 	qc->tf.ctl |= ATA_NIEN;
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-05-15  0:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-14 18:42 [PATCH] libata atapi work #5 Pat LaVarre
2004-05-14 19:09 ` Jeff Garzik
2004-05-14 19:27   ` Pat LaVarre
2004-05-14 19:47     ` Jeff Garzik
2004-05-14 20:00       ` Pat LaVarre
2004-05-14 20:14         ` Leon Woestenberg
2004-05-14 20:15         ` Jeff Garzik
2004-05-14 20:23           ` Leon Woestenberg
2004-05-14 20:29             ` Jeff Garzik
2004-05-14 23:09           ` Pat LaVarre
2004-05-15  0:01           ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2004-05-14 18:26 Jeff Garzik

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).