aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2010-10-08 10:56:39 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-10-21 20:21:05 -0400
commitc1ce90f25c52201469c71a2a91e2d9b27c3082f2 (patch)
tree67cfa4a2c2b216e877581bb0148005f9026cd88d /drivers
parent4bb969db48dd507e5313dafa285215cb1c36704a (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')
-rw-r--r--drivers/ata/pata_cmd640.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
index e5f289f59ca3..549d28dbf90d 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)
161 return 0; 161 return 0;
162} 162}
163 163
164static bool cmd640_sff_irq_check(struct ata_port *ap)
165{
166 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
167 int irq_reg = ap->port_no ? ARTIM23 : CFR;
168 u8 irq_stat, irq_mask = ap->port_no ? 0x10 : 0x04;
169
170 pci_read_config_byte(pdev, irq_reg, &irq_stat);
171
172 return irq_stat & irq_mask;
173}
174
164static struct scsi_host_template cmd640_sht = { 175static struct scsi_host_template cmd640_sht = {
165 ATA_PIO_SHT(DRV_NAME), 176 ATA_PIO_SHT(DRV_NAME),
166}; 177};
@@ -169,6 +180,7 @@ static struct ata_port_operations cmd640_port_ops = {
169 .inherits = &ata_sff_port_ops, 180 .inherits = &ata_sff_port_ops,
170 /* In theory xfer_noirq is not needed once we kill the prefetcher */ 181 /* In theory xfer_noirq is not needed once we kill the prefetcher */
171 .sff_data_xfer = ata_sff_data_xfer_noirq, 182 .sff_data_xfer = ata_sff_data_xfer_noirq,
183 .sff_irq_check = cmd640_sff_irq_check,
172 .qc_issue = cmd640_qc_issue, 184 .qc_issue = cmd640_qc_issue,
173 .cable_detect = ata_cable_40wire, 185 .cable_detect = ata_cable_40wire,
174 .set_piomode = cmd640_set_piomode, 186 .set_piomode = cmd640_set_piomode,