From: Alan Cox Date: Fri, 23 Mar 2007 18:57:23 +0000 (+0000) Subject: pata_pdc202xx_old: LBA48 bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5e5188108bcf9ab2e6f87b4b54924354040b0aa7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c index acdc52cbe38a..0a1493398913 100644 --- a/drivers/ata/pata_pdc202xx_old.c +++ b/drivers/ata/pata_pdc202xx_old.c @@ -195,7 +195,7 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc) /* Cases the state machine will not complete correctly without help */ 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) len |= 0x06000000;