aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_bf54x.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-05-10 15:41:30 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-05-17 22:49:02 -0400
commit3e4ec3443f70fbe144799ccf0b1c3797f78d1715 (patch)
treecfb297e42075baacbbabfb6034e3e7c9a44c73b2 /drivers/ata/pata_bf54x.c
parentc7a8209f766961eea4cfc6f22d2d6e06ef63546c (diff)
libata: kill ATA_FLAG_DISABLED
ATA_FLAG_DISABLED is only used by drivers which don't use ->error_handler framework and is largely broken. Its only meaningful function is to make irq handlers skip processing if the flag is set, which is largely useless and even harmful as it makes those ports more likely to cause IRQ storms. Kill ATA_FLAG_DISABLED and makes the callers disable attached devices instead. ata_port_probe() and ata_port_disable() which manipulate the flag are also killed. This simplifies condition check in IRQ handlers. While updating IRQ handlers, remove ap NULL check as libata guarantees consecutive port allocation (unoccupied ports are initialized with dummies) and long-obsolete ATA_QCFLAG_ACTIVE check (checked by ata_qc_from_tag()). Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_bf54x.c')
-rw-r--r--drivers/ata/pata_bf54x.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index 07c110470e25..e9bf44cf4142 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1400,18 +1400,12 @@ static irqreturn_t bfin_ata_interrupt(int irq, void *dev_instance)
1400 spin_lock_irqsave(&host->lock, flags); 1400 spin_lock_irqsave(&host->lock, flags);
1401 1401
1402 for (i = 0; i < host->n_ports; i++) { 1402 for (i = 0; i < host->n_ports; i++) {
1403 struct ata_port *ap; 1403 struct ata_port *ap = host->ports[i];
1404 struct ata_queued_cmd *qc;
1404 1405
1405 ap = host->ports[i]; 1406 qc = ata_qc_from_tag(ap, ap->link.active_tag);
1406 if (ap && 1407 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)))
1407 !(ap->flags & ATA_FLAG_DISABLED)) { 1408 handled |= bfin_ata_host_intr(ap, qc);
1408 struct ata_queued_cmd *qc;
1409
1410 qc = ata_qc_from_tag(ap, ap->link.active_tag);
1411 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)) &&
1412 (qc->flags & ATA_QCFLAG_ACTIVE))
1413 handled |= bfin_ata_host_intr(ap, qc);
1414 }
1415 } 1409 }
1416 1410
1417 spin_unlock_irqrestore(&host->lock, flags); 1411 spin_unlock_irqrestore(&host->lock, flags);