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 <[EMAIL PROTECTED]>

diff -u --new-file --recursive --exclude-from /usr/src/exclude 
linux.vanilla-2.6.21-rc4-mm1/drivers/ata/pata_pdc202xx_old.c 
linux-2.6.21-rc4-mm1/drivers/ata/pata_pdc202xx_old.c
--- linux.vanilla-2.6.21-rc4-mm1/drivers/ata/pata_pdc202xx_old.c        
2007-03-23 11:49:49.000000000 +0000
+++ linux-2.6.21-rc4-mm1/drivers/ata/pata_pdc202xx_old.c        2007-03-23 
13:21:54.000000000 +0000
@@ -22,7 +22,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_pdc202xx_old"
-#define DRV_VERSION "0.4.2"
+#define DRV_VERSION "0.4.3"
 
 static int pdc2026x_cable_detect(struct ata_port *ap)
 {
@@ -167,7 +167,7 @@
        /* 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;
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to