aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,