aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-24 23:22:47 -0400
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);
244static int ahci_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val); 244static int ahci_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val);
245static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 245static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
246static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc); 246static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc);
247static void ahci_irq_clear(struct ata_port *ap);
248static int ahci_port_start(struct ata_port *ap); 247static int ahci_port_start(struct ata_port *ap);
249static void ahci_port_stop(struct ata_port *ap); 248static void ahci_port_stop(struct ata_port *ap);
250static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf); 249static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
@@ -307,7 +306,7 @@ static const struct ata_port_operations ahci_ops = {
307 .qc_prep = ahci_qc_prep, 306 .qc_prep = ahci_qc_prep,
308 .qc_issue = ahci_qc_issue, 307 .qc_issue = ahci_qc_issue,
309 308
310 .irq_clear = ahci_irq_clear, 309 .irq_clear = ata_noop_irq_clear,
311 310
312 .scr_read = ahci_scr_read, 311 .scr_read = ahci_scr_read,
313 .scr_write = ahci_scr_write, 312 .scr_write = ahci_scr_write,
@@ -343,7 +342,7 @@ static const struct ata_port_operations ahci_vt8251_ops = {
343 .qc_prep = ahci_qc_prep, 342 .qc_prep = ahci_qc_prep,
344 .qc_issue = ahci_qc_issue, 343 .qc_issue = ahci_qc_issue,
345 344
346 .irq_clear = ahci_irq_clear, 345 .irq_clear = ata_noop_irq_clear,
347 346
348 .scr_read = ahci_scr_read, 347 .scr_read = ahci_scr_read,
349 .scr_write = ahci_scr_write, 348 .scr_write = ahci_scr_write,
@@ -377,7 +376,7 @@ static const struct ata_port_operations ahci_p5wdh_ops = {
377 .qc_prep = ahci_qc_prep, 376 .qc_prep = ahci_qc_prep,
378 .qc_issue = ahci_qc_issue, 377 .qc_issue = ahci_qc_issue,
379 378
380 .irq_clear = ahci_irq_clear, 379 .irq_clear = ata_noop_irq_clear,
381 380
382 .scr_read = ahci_scr_read, 381 .scr_read = ahci_scr_read,
383 .scr_write = ahci_scr_write, 382 .scr_write = ahci_scr_write,
@@ -1769,11 +1768,6 @@ static void ahci_port_intr(struct ata_port *ap)
1769 } 1768 }
1770} 1769}
1771 1770
1772static void ahci_irq_clear(struct ata_port *ap)
1773{
1774 /* TODO */
1775}
1776
1777static irqreturn_t ahci_interrupt(int irq, void *dev_instance) 1771static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
1778{ 1772{
1779 struct ata_host *host = dev_instance; 1773 struct ata_host *host = dev_instance;