[PATCH] libata: Fix heuristic typos add LBA48PIO flag and support code, add IRQ flag...
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Tue, 17 Jan 2006 20:50:31 +0000 (20:50 +0000)
committerJeff Garzik <jgarzik@pobox.com>
Wed, 18 Jan 2006 00:37:45 +0000 (19:37 -0500)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/scsi/libata-core.c
include/linux/libata.h

index b42acbe0e9a5e60684ed4e4fc42dcf1beb1630f2..e6044455ca4533c33c88a2d95c516510a0685dc9 100644 (file)
@@ -611,6 +611,10 @@ int ata_rwcmd_protocol(struct ata_queued_cmd *qc)
        if (dev->flags & ATA_DFLAG_PIO) {
                tf->protocol = ATA_PROT_PIO;
                index = dev->multi_count ? 0 : 8;
+       } else if (lba48 && (qc->ap->flags & ATA_FLAG_PIO_LBA48)) {
+               /* Unable to use DMA due to host limitation */
+               tf->protocol = ATA_PROT_PIO;
+               index = dev->multi_count ? 0 : 4;
        } else {
                tf->protocol = ATA_PROT_DMA;
                index = 16;
index af6624450f653727c7692958eb50ec8651d32282..9e5db2949c588c551fa608d801e7cc627bb39844 100644 (file)
@@ -126,16 +126,19 @@ enum {
 
        ATA_FLAG_SUSPENDED      = (1 << 12), /* port is suspended */
 
+       ATA_FLAG_PIO_LBA48      = (1 << 13), /* Host DMA engine is LBA28 only */
+       ATA_FLAG_IRQ_MASK       = (1 << 14), /* Mask IRQ in PIO xfers */
+
        ATA_QCFLAG_ACTIVE       = (1 << 1), /* cmd not yet ack'd to scsi lyer */
        ATA_QCFLAG_SG           = (1 << 3), /* have s/g table? */
        ATA_QCFLAG_SINGLE       = (1 << 4), /* no s/g, just a single buffer */
        ATA_QCFLAG_DMAMAP       = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE,
 
        /* various lengths of time */
-       ATA_TMOUT_EDD           = 5 * HZ,       /* hueristic */
+       ATA_TMOUT_EDD           = 5 * HZ,       /* heuristic */
        ATA_TMOUT_PIO           = 30 * HZ,
-       ATA_TMOUT_BOOT          = 30 * HZ,      /* hueristic */
-       ATA_TMOUT_BOOT_QUICK    = 7 * HZ,       /* hueristic */
+       ATA_TMOUT_BOOT          = 30 * HZ,      /* heuristic */
+       ATA_TMOUT_BOOT_QUICK    = 7 * HZ,       /* heuristic */
        ATA_TMOUT_CDB           = 30 * HZ,
        ATA_TMOUT_CDB_QUICK     = 5 * HZ,
        ATA_TMOUT_INTERNAL      = 30 * HZ,