]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] libata: add pio flush for via atapi (was: Re: TR: ASUS A8V Deluxe, x86_64)
authorAlbert Lee <albertcc@tw.ibm.com>
Mon, 22 May 2006 03:43:46 +0000 (11:43 +0800)
committerJeff Garzik <jeff@garzik.org>
Wed, 24 May 2006 05:43:53 +0000 (01:43 -0400)
Backport the "pio flush" from the libata major update to 2.6.17 for via atapi.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/scsi/libata-core.c

index 823dfa78c0ba527ea3e38c94dc7114e31457f4ca..fa476e7e0a480c52f2808b721e3c465eb1ba5fc3 100644 (file)
@@ -3643,6 +3643,8 @@ static void ata_pio_block(struct ata_port *ap)
 
                ata_pio_sector(qc);
        }
+
+       ata_altstatus(ap); /* flush */
 }
 
 static void ata_pio_error(struct ata_port *ap)
@@ -3759,11 +3761,14 @@ static void atapi_packet_task(void *_data)
                spin_lock_irqsave(&ap->host_set->lock, flags);
                ap->flags &= ~ATA_FLAG_NOINTR;
                ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1);
+               ata_altstatus(ap); /* flush */
+
                if (qc->tf.protocol == ATA_PROT_ATAPI_DMA)
                        ap->ops->bmdma_start(qc);       /* initiate bmdma */
                spin_unlock_irqrestore(&ap->host_set->lock, flags);
        } else {
                ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1);
+               ata_altstatus(ap); /* flush */
 
                /* PIO commands are handled by polling */
                ap->hsm_task_state = HSM_ST;