The patch titled
     libata: drain fifo on stuck DRQ HSM violation
has been removed from the -mm tree.  Its filename was
     libata-drain-fifo-on-stuck-drq-hsm-violation-try2.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: libata: drain fifo on stuck DRQ HSM violation
From: Mark Lord <[EMAIL PROTECTED]>

Drain up to 512 words from host/bridge FIFO on stuck DRQ HSM violation,
rather than just getting stuck there forever.

Signed-off-by: Mark Lord <[EMAIL PROTECTED]>
Cc: Tejun Heo <[EMAIL PROTECTED]>
Cc: Alan Cox <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---


diff -puN 
drivers/ata/libata-sff.c~libata-drain-fifo-on-stuck-drq-hsm-violation-try2 
drivers/ata/libata-sff.c
--- a/drivers/ata/libata-sff.c~libata-drain-fifo-on-stuck-drq-hsm-violation-try2
+++ a/drivers/ata/libata-sff.c
@@ -378,6 +378,28 @@ void ata_bmdma_thaw(struct ata_port *ap)
        ap->ops->irq_on(ap);
 }
 
+static void ata_drain_fifo(struct ata_port *ap, struct ata_queued_cmd *qc)
+{
+       u8 stat = ata_chk_status(ap);
+       /*
+        * Try to clear stuck DRQ if necessary,
+        * by reading/discarding up to two sectors worth of data.
+        */
+       if ((stat & ATA_DRQ) && (!qc || qc->dma_dir != DMA_TO_DEVICE)) {
+               unsigned int i;
+               unsigned int limit = qc ? qc->sect_size : ATA_SECT_SIZE;
+
+               printk(KERN_WARNING "Draining up to %u words from data FIFO.\n",
+                                                                       limit);
+               for (i = 0; i < limit ; ++i) {
+                       ioread16(ap->ioaddr.data_addr);
+                       if (!(ata_chk_status(ap) & ATA_DRQ))
+                               break;
+               }
+               printk(KERN_WARNING "Drained %u/%u words.\n", i, limit);
+       }
+}
+
 /**
  *     ata_bmdma_drive_eh - Perform EH with given methods for BMDMA controller
  *     @ap: port to handle error for
@@ -434,7 +456,7 @@ void ata_bmdma_drive_eh(struct ata_port 
        }
 
        ata_altstatus(ap);
-       ata_chk_status(ap);
+       ata_drain_fifo(ap, qc);
        ap->ops->irq_clear(ap);
 
        spin_unlock_irqrestore(ap->lock, flags);
_

Patches currently in -mm which might be from [EMAIL PROTECTED] are

git-libata-all.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to