[PATCH 1/1] libata: add pio flush for via atapi (was: Re: TR: ASUS A8V Deluxe, x86_64)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Backport the "pio flush" from the libata major update to 2.6.17 for via atapi.

Signed-off-by: Albert Lee <albertcc@xxxxxxxxxx>
---
According to Vincent's test result, adding the "pio flush"
fixes the via atapi problem. Maybe the VIA adapter caches the written
PIO data/ATAPI CDB packet?

Patch backported for mainline 2.6.17-rcX (f1adad78dd2fc8edaa513e0bde92b4c64340245c).
For your review, thanks.

--- mainline/drivers/scsi/libata-core.c	2006-05-22 10:53:36.000000000 +0800
+++ svia_atapi/drivers/scsi/libata-core.c	2006-05-22 11:25:28.000000000 +0800
@@ -3643,6 +3643,8 @@ static void ata_pio_block(struct ata_por
 
 		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 *_dat
 		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;


-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux