diff options
Diffstat (limited to 'drivers/ide/siimage.c')
-rw-r--r-- | drivers/ide/siimage.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ide/siimage.c b/drivers/ide/siimage.c index af4fe7c48a01..d95df528562f 100644 --- a/drivers/ide/siimage.c +++ b/drivers/ide/siimage.c | |||
@@ -338,6 +338,16 @@ static void sil_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
338 | sil_iowrite16(dev, ultra, ua); | 338 | sil_iowrite16(dev, ultra, ua); |
339 | } | 339 | } |
340 | 340 | ||
341 | static int sil_test_irq(ide_hwif_t *hwif) | ||
342 | { | ||
343 | struct pci_dev *dev = to_pci_dev(hwif->dev); | ||
344 | unsigned long addr = siimage_selreg(hwif, 1); | ||
345 | u8 val = sil_ioread8(dev, addr); | ||
346 | |||
347 | /* Return 1 if INTRQ asserted */ | ||
348 | return (val & 8) ? 1 : 0; | ||
349 | } | ||
350 | |||
341 | /** | 351 | /** |
342 | * siimage_mmio_dma_test_irq - check we caused an IRQ | 352 | * siimage_mmio_dma_test_irq - check we caused an IRQ |
343 | * @drive: drive we are testing | 353 | * @drive: drive we are testing |
@@ -670,6 +680,7 @@ static const struct ide_port_ops sil_pata_port_ops = { | |||
670 | .set_pio_mode = sil_set_pio_mode, | 680 | .set_pio_mode = sil_set_pio_mode, |
671 | .set_dma_mode = sil_set_dma_mode, | 681 | .set_dma_mode = sil_set_dma_mode, |
672 | .quirkproc = sil_quirkproc, | 682 | .quirkproc = sil_quirkproc, |
683 | .test_irq = sil_test_irq, | ||
673 | .udma_filter = sil_pata_udma_filter, | 684 | .udma_filter = sil_pata_udma_filter, |
674 | .cable_detect = sil_cable_detect, | 685 | .cable_detect = sil_cable_detect, |
675 | }; | 686 | }; |
@@ -680,6 +691,7 @@ static const struct ide_port_ops sil_sata_port_ops = { | |||
680 | .reset_poll = sil_sata_reset_poll, | 691 | .reset_poll = sil_sata_reset_poll, |
681 | .pre_reset = sil_sata_pre_reset, | 692 | .pre_reset = sil_sata_pre_reset, |
682 | .quirkproc = sil_quirkproc, | 693 | .quirkproc = sil_quirkproc, |
694 | .test_irq = sil_test_irq, | ||
683 | .udma_filter = sil_sata_udma_filter, | 695 | .udma_filter = sil_sata_udma_filter, |
684 | .cable_detect = sil_cable_detect, | 696 | .cable_detect = sil_cable_detect, |
685 | }; | 697 | }; |