diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2010-10-08 18:56:39 +0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2010-10-21 20:21:05 -0400 |
commit | c1ce90f25c52201469c71a2a91e2d9b27c3082f2 (patch) | |
tree | 67cfa4a2c2b216e877581bb0148005f9026cd88d /drivers/ata/pata_cmd640.c | |
parent | 4bb969db48dd507e5313dafa285215cb1c36704a (diff) |
pata_cmd640: implement sff_irq_check() method
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_cmd640.c')
-rw-r--r-- | drivers/ata/pata_cmd640.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c index e5f289f59ca..549d28dbf90 100644 --- a/drivers/ata/pata_cmd640.c +++ b/drivers/ata/pata_cmd640.c @@ -161,6 +161,17 @@ static int cmd640_port_start(struct ata_port *ap) return 0; } +static bool cmd640_sff_irq_check(struct ata_port *ap) +{ + struct pci_dev *pdev = to_pci_dev(ap->host->dev); + int irq_reg = ap->port_no ? ARTIM23 : CFR; + u8 irq_stat, irq_mask = ap->port_no ? 0x10 : 0x04; + + pci_read_config_byte(pdev, irq_reg, &irq_stat); + + return irq_stat & irq_mask; +} + static struct scsi_host_template cmd640_sht = { ATA_PIO_SHT(DRV_NAME), }; @@ -169,6 +180,7 @@ static struct ata_port_operations cmd640_port_ops = { .inherits = &ata_sff_port_ops, /* In theory xfer_noirq is not needed once we kill the prefetcher */ .sff_data_xfer = ata_sff_data_xfer_noirq, + .sff_irq_check = cmd640_sff_irq_check, .qc_issue = cmd640_qc_issue, .cable_detect = ata_cable_40wire, .set_piomode = cmd640_set_piomode, |