rpms/kernel/F-7 linux-2.6-libata-setxfer.patch,1.2,1.3

Dave Jones (davej) fedora-extras-commits at redhat.com
Wed Jun 6 23:43:55 UTC 2007


Author: davej

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19849

Modified Files:
	linux-2.6-libata-setxfer.patch 
Log Message:
fix regression in the setxfer patch.

linux-2.6-libata-setxfer.patch:

Index: linux-2.6-libata-setxfer.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/linux-2.6-libata-setxfer.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-libata-setxfer.patch	6 Jun 2007 22:40:09 -0000	1.2
+++ linux-2.6-libata-setxfer.patch	6 Jun 2007 23:43:50 -0000	1.3
@@ -102,3 +102,75 @@
  		.pio_mask = 0x1f,
  		.mwdma_mask = 0x07,
  		.udma_mask = 0x7f,	/* FIXME: should check north bridge */
+
+
+
+sata_promise uses two different command modes - packet and TF.  Packet
+mode is intelligent low-overhead mode while TF is the same old
+taskfile interface.  As with other advanced interface (ahci/sil24),
+ATA_TFLAG_POLLING has no effect in packet mode.  However, PIO commands
+are issued using TF interface in polling mode, so pdc_interrupt()
+considers interrupts spurious if ATA_TFLAG_POLLING is set.
+
+This is broken for polling NODATA commands because command is issued
+using packet mode but the interrupt handler ignores it due to
+ATA_TFLAG_POLLING.  Fix pdc_qc_issue_prot() such that ATA/ATAPI NODATA
+commands are issued using TF interface if ATA_TFLAG_POLLING is set.
+
+This patch fixes detection failure introduced by polling SETXFERMODE.
+
+Signed-off-by: Tejun Heo <htejun at gmail.com>
+---
+David, please verify this patch.  Mikael, does this look okay?  Please
+push this upstream after David and Mikael's ack.
+
+(This repost is identical to the previous posting but it's now on the
+ correct thread.)
+
+Thanks.
+
+ drivers/ata/sata_promise.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
+index 2b924a6..6dc0b01 100644
+--- a/drivers/ata/sata_promise.c
++++ b/drivers/ata/sata_promise.c
+@@ -784,9 +784,12 @@ static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
+ 		if (qc->dev->flags & ATA_DFLAG_CDB_INTR)
+ 			break;
+ 		/*FALLTHROUGH*/
++	case ATA_PROT_NODATA:
++		if (qc->tf.flags & ATA_TFLAG_POLLING)
++			break;
++		/*FALLTHROUGH*/
+ 	case ATA_PROT_ATAPI_DMA:
+ 	case ATA_PROT_DMA:
+-	case ATA_PROT_NODATA:
+ 		pdc_packet_start(qc);
+ 		return 0;
+ 
+@@ -800,7 +803,7 @@ static unsigned int pdc_qc_issue_prot(struct ata_queued_cmd *qc)
+ static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
+ {
+ 	WARN_ON (tf->protocol == ATA_PROT_DMA ||
+-		 tf->protocol == ATA_PROT_NODATA);
++		 tf->protocol == ATA_PROT_ATAPI_DMA);
+ 	ata_tf_load(ap, tf);
+ }
+ 
+@@ -808,7 +811,7 @@ static void pdc_tf_load_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
+ static void pdc_exec_command_mmio(struct ata_port *ap, const struct ata_taskfile *tf)
+ {
+ 	WARN_ON (tf->protocol == ATA_PROT_DMA ||
+-		 tf->protocol == ATA_PROT_NODATA);
++		 tf->protocol == ATA_PROT_ATAPI_DMA);
+ 	ata_exec_command(ap, tf);
+ }
+ 
+-
+To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
+the body of a message to majordomo at vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+Please read the FAQ at  http://www.tux.org/lkml/
+




More information about the scm-commits mailing list