2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 01:34:00 +08:00

pata_pdc202xx_old: LBA48 bug

In LBA48 mode we have to help the controller to get anything to work. The
chip provides a register giving word counts meant for ATAPI use which we
can use. However we need to load the count in words not bytes..

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Alan Cox 2007-03-23 18:57:23 +00:00 committed by Jeff Garzik
parent 8c3c52a8f0
commit 5e5188108b

View File

@ -195,7 +195,7 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc)
/* Cases the state machine will not complete correctly without help */ /* Cases the state machine will not complete correctly without help */
if ((tf->flags & ATA_TFLAG_LBA48) || tf->protocol == ATA_PROT_ATAPI_DMA) if ((tf->flags & ATA_TFLAG_LBA48) || tf->protocol == ATA_PROT_ATAPI_DMA)
{ {
len = qc->nbytes; len = qc->nbytes / 2;
if (tf->flags & ATA_TFLAG_WRITE) if (tf->flags & ATA_TFLAG_WRITE)
len |= 0x06000000; len |= 0x06000000;