pata_pdc202xx_old: implement sff_irq_check() method

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by Sergei Shtylyov and committed by Jeff Garzik 606254e3 c1ce90f2

+23
+23
drivers/ata/pata_pdc202xx_old.c
··· 44 ndelay(400); 45 } 46 47 /** 48 * pdc202xx_configure_piomode - set chip PIO timing 49 * @ap: ATA interface ··· 303 .set_dmamode = pdc202xx_set_dmamode, 304 305 .sff_exec_command = pdc202xx_exec_command, 306 }; 307 308 static struct ata_port_operations pdc2026x_port_ops = { ··· 319 .port_start = pdc2026x_port_start, 320 321 .sff_exec_command = pdc202xx_exec_command, 322 }; 323 324 static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)
··· 44 ndelay(400); 45 } 46 47 + static bool pdc202xx_irq_check(struct ata_port *ap) 48 + { 49 + struct pci_dev *pdev = to_pci_dev(ap->host->dev); 50 + unsigned long master = pci_resource_start(pdev, 4); 51 + u8 sc1d = inb(master + 0x1d); 52 + 53 + if (ap->port_no) { 54 + /* 55 + * bit 7: error, bit 6: interrupting, 56 + * bit 5: FIFO full, bit 4: FIFO empty 57 + */ 58 + return sc1d & 0x40; 59 + } else { 60 + /* 61 + * bit 3: error, bit 2: interrupting, 62 + * bit 1: FIFO full, bit 0: FIFO empty 63 + */ 64 + return sc1d & 0x04; 65 + } 66 + } 67 + 68 /** 69 * pdc202xx_configure_piomode - set chip PIO timing 70 * @ap: ATA interface ··· 282 .set_dmamode = pdc202xx_set_dmamode, 283 284 .sff_exec_command = pdc202xx_exec_command, 285 + .sff_irq_check = pdc202xx_irq_check, 286 }; 287 288 static struct ata_port_operations pdc2026x_port_ops = { ··· 297 .port_start = pdc2026x_port_start, 298 299 .sff_exec_command = pdc202xx_exec_command, 300 + .sff_irq_check = pdc202xx_irq_check, 301 }; 302 303 static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id)