Commit 8d238e01 authored by Alan Cox's avatar Alan Cox Committed by Jeff Garzik

[PATCH] libata: Fix heuristic typos add LBA48PIO flag and support code, add IRQ flag for next diff

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 012b265f
...@@ -611,6 +611,10 @@ int ata_rwcmd_protocol(struct ata_queued_cmd *qc) ...@@ -611,6 +611,10 @@ int ata_rwcmd_protocol(struct ata_queued_cmd *qc)
if (dev->flags & ATA_DFLAG_PIO) { if (dev->flags & ATA_DFLAG_PIO) {
tf->protocol = ATA_PROT_PIO; tf->protocol = ATA_PROT_PIO;
index = dev->multi_count ? 0 : 8; 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 { } else {
tf->protocol = ATA_PROT_DMA; tf->protocol = ATA_PROT_DMA;
index = 16; index = 16;
......
...@@ -126,16 +126,19 @@ enum { ...@@ -126,16 +126,19 @@ enum {
ATA_FLAG_SUSPENDED = (1 << 12), /* port is suspended */ 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_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */ ATA_QCFLAG_SINGLE = (1 << 4), /* no s/g, just a single buffer */
ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE, ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE,
/* various lengths of time */ /* various lengths of time */
ATA_TMOUT_EDD = 5 * HZ, /* hueristic */ ATA_TMOUT_EDD = 5 * HZ, /* heuristic */
ATA_TMOUT_PIO = 30 * HZ, ATA_TMOUT_PIO = 30 * HZ,
ATA_TMOUT_BOOT = 30 * HZ, /* hueristic */ ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */
ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* hueristic */ ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */
ATA_TMOUT_CDB = 30 * HZ, ATA_TMOUT_CDB = 30 * HZ,
ATA_TMOUT_CDB_QUICK = 5 * HZ, ATA_TMOUT_CDB_QUICK = 5 * HZ,
ATA_TMOUT_INTERNAL = 30 * HZ, ATA_TMOUT_INTERNAL = 30 * HZ,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment