Commit 32b467bb authored by Jeff Garzik's avatar Jeff Garzik

[libata] kill ATA_QCFLAG_POLL flag

The standard ATA bit nIEN in the Device Control register serves as
the indicator for whether we are polling or not.  As it mirrors
ATA_QCFLAG_POLL completely, eliminate that in favor of testing
ATA_NIEN bit.
parent 63a2ea09
...@@ -2733,7 +2733,7 @@ irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs) ...@@ -2733,7 +2733,7 @@ irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs)
struct ata_queued_cmd *qc; struct ata_queued_cmd *qc;
qc = ata_qc_from_tag(ap, ap->active_tag); qc = ata_qc_from_tag(ap, ap->active_tag);
if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0)) if (qc && (!(qc->tf.ctl & ATA_NIEN)))
handled += ata_host_intr(ap, qc); handled += ata_host_intr(ap, qc);
} }
} }
......
...@@ -421,7 +421,7 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r ...@@ -421,7 +421,7 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r
struct ata_queued_cmd *qc; struct ata_queued_cmd *qc;
qc = ata_qc_from_tag(ap, ap->active_tag); qc = ata_qc_from_tag(ap, ap->active_tag);
if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0)) if (qc && (!(qc->tf.ctl & ATA_NIEN)))
handled += pdc_host_intr(ap, qc); handled += pdc_host_intr(ap, qc);
} }
} }
......
...@@ -748,7 +748,7 @@ static irqreturn_t pdc20621_interrupt (int irq, void *dev_instance, struct pt_re ...@@ -748,7 +748,7 @@ static irqreturn_t pdc20621_interrupt (int irq, void *dev_instance, struct pt_re
struct ata_queued_cmd *qc; struct ata_queued_cmd *qc;
qc = ata_qc_from_tag(ap, ap->active_tag); qc = ata_qc_from_tag(ap, ap->active_tag);
if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0)) if (qc && (!(qc->tf.ctl & ATA_NIEN)))
handled += pdc20621_host_intr(ap, qc, (i > 4), handled += pdc20621_host_intr(ap, qc, (i > 4),
mmio_base); mmio_base);
} }
......
...@@ -175,7 +175,7 @@ irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance, struct pt_regs *reg ...@@ -175,7 +175,7 @@ irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance, struct pt_regs *reg
struct ata_queued_cmd *qc; struct ata_queued_cmd *qc;
qc = ata_qc_from_tag(ap, ap->active_tag); qc = ata_qc_from_tag(ap, ap->active_tag);
if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0)) if (qc && (!(qc->tf.ctl & ATA_NIEN)))
handled += ata_host_intr(ap, qc); handled += ata_host_intr(ap, qc);
} }
} }
......
...@@ -112,7 +112,6 @@ enum { ...@@ -112,7 +112,6 @@ enum {
ATA_QCFLAG_DMA = (1 << 2), /* data delivered via DMA */ ATA_QCFLAG_DMA = (1 << 2), /* data delivered via DMA */
ATA_QCFLAG_ATAPI = (1 << 3), /* is ATAPI packet command? */ ATA_QCFLAG_ATAPI = (1 << 3), /* is ATAPI packet command? */
ATA_QCFLAG_SG = (1 << 4), /* have s/g table? */ ATA_QCFLAG_SG = (1 << 4), /* have s/g table? */
ATA_QCFLAG_POLL = (1 << 5), /* polling, no interrupts */
/* various lengths of time */ /* various lengths of time */
ATA_TMOUT_EDD = 5 * HZ, /* hueristic */ ATA_TMOUT_EDD = 5 * HZ, /* hueristic */
...@@ -483,7 +482,6 @@ static inline u8 ata_wait_idle(struct ata_port *ap) ...@@ -483,7 +482,6 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
static inline void ata_qc_set_polling(struct ata_queued_cmd *qc) static inline void ata_qc_set_polling(struct ata_queued_cmd *qc)
{ {
qc->flags |= ATA_QCFLAG_POLL;
qc->flags &= ~ATA_QCFLAG_DMA; qc->flags &= ~ATA_QCFLAG_DMA;
qc->tf.ctl |= ATA_NIEN; qc->tf.ctl |= ATA_NIEN;
} }
......
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