summaryrefslogtreecommitdiff
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-25 12:22:47 +0900
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:16 -0400
commit358f9a77a668660729e705fde9c3cf69f013aa98 (patch)
treea249660fdd9f252925eff9eaac3ed7836c839f91 /drivers/ata/ahci.c
parentc1bc899f5805771926c9198e2ab4d77122c356a1 (diff)
libata: implement and use ata_noop_irq_clear()
->irq_clear() is used to clear IRQ bit of a SFF controller and isn't useful for drivers which don't use libata SFF HSM implementation. However, it's a required callback and many drivers implement their own noop version as placeholder. This patch implements ata_noop_irq_clear and use it to replace those custom placeholders. Also, SFF drivers which don't support BMDMA don't need to use ata_bmdma_irq_clear(). It becomes noop if BMDMA address isn't initialized. Convert them to use ata_noop_irq_clear(). Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 1bd258e5390f..492e521715d6 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -244,7 +244,6 @@ static int ahci_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val);
static int ahci_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val);
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
-static void ahci_irq_clear(struct ata_port *ap);
static int ahci_port_start(struct ata_port *ap);
static void ahci_port_stop(struct ata_port *ap);
static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
@@ -307,7 +306,7 @@ static const struct ata_port_operations ahci_ops = {
.qc_prep = ahci_qc_prep,
.qc_issue = ahci_qc_issue,
- .irq_clear = ahci_irq_clear,
+ .irq_clear = ata_noop_irq_clear,
.scr_read = ahci_scr_read,
.scr_write = ahci_scr_write,
@@ -343,7 +342,7 @@ static const struct ata_port_operations ahci_vt8251_ops = {
.qc_prep = ahci_qc_prep,
.qc_issue = ahci_qc_issue,
- .irq_clear = ahci_irq_clear,
+ .irq_clear = ata_noop_irq_clear,
.scr_read = ahci_scr_read,
.scr_write = ahci_scr_write,
@@ -377,7 +376,7 @@ static const struct ata_port_operations ahci_p5wdh_ops = {
.qc_prep = ahci_qc_prep,
.qc_issue = ahci_qc_issue,
- .irq_clear = ahci_irq_clear,
+ .irq_clear = ata_noop_irq_clear,
.scr_read = ahci_scr_read,
.scr_write = ahci_scr_write,
@@ -1769,11 +1768,6 @@ static void ahci_port_intr(struct ata_port *ap)
}
}
-static void ahci_irq_clear(struct ata_port *ap)
-{
- /* TODO */
-}
-
static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
{
struct ata_host *host = dev_instance;