diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 10:11:11 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 10:11:11 -0700 |
commit | e6423407d01168f7760cdee7270d9f51d1240301 (patch) | |
tree | 979795cfa8f6946238ab31f544159142f3e7df93 /drivers/ide/cmd640.c | |
parent | 7f8189068726492950bf1a2dcfd9b51314560abf (diff) | |
parent | 39c58f37a10198054c656c28202fb1e6d22fd505 (diff) | |
download | talos-obmc-linux-e6423407d01168f7760cdee7270d9f51d1240301.tar.gz talos-obmc-linux-e6423407d01168f7760cdee7270d9f51d1240301.zip |
Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (34 commits)
ide-cd: prevent null pointer deref via cdrom_newpc_intr
ide: BUG() on unknown requests
ide: filter out invalid DMA xfer mode changes in HDIO_DRIVE_CMD ioctl handler
ide: do not access ide_drive_t 'drive_data' field directly
sl82c105: implement test_irq() method
siimage: implement test_irq() method
pdc202xx_old: implement test_irq() method (take 2)
cmd64x: implement test_irq() method
cmd640: implement test_irq() method
ide: move ack_intr() method into 'struct ide_port_ops' (take 2)
ide: move IRQ clearing from ack_intr() method to clear_irq() method (take 2)
siimage: use ide_dma_test_irq() (take 2)
cmd64x: implement clear_irq() method (take 2)
ide: call clear_irq() method in ide_timer_expiry()
sgiioc4: coding style cleanup
ide: don't enable IORDY at a probe time
ide: IORDY handling fixes
ata: add ata_id_pio_need_iordy() helper (v2)
ide-tape: fix build issue
ide: unify interrupt reason checking
...
Diffstat (limited to 'drivers/ide/cmd640.c')
-rw-r--r-- | drivers/ide/cmd640.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/ide/cmd640.c b/drivers/ide/cmd640.c index 1683ed5c7329..1a32d62ed86b 100644 --- a/drivers/ide/cmd640.c +++ b/drivers/ide/cmd640.c @@ -153,6 +153,7 @@ static int cmd640_vlb; #define ARTTIM23 0x57 #define ARTTIM23_DIS_RA2 0x04 #define ARTTIM23_DIS_RA3 0x08 +#define ARTTIM23_IDE23INTR 0x10 #define DRWTIM23 0x58 #define BRST 0x59 @@ -629,12 +630,24 @@ static void cmd640_init_dev(ide_drive_t *drive) #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ } +static int cmd640_test_irq(ide_hwif_t *hwif) +{ + struct pci_dev *dev = to_pci_dev(hwif->dev); + int irq_reg = hwif->channel ? ARTTIM23 : CFR; + u8 irq_stat, irq_mask = hwif->channel ? ARTTIM23_IDE23INTR : + CFR_IDE01INTR; + + pci_read_config_byte(dev, irq_reg, &irq_stat); + + return (irq_stat & irq_mask) ? 1 : 0; +} static const struct ide_port_ops cmd640_port_ops = { .init_dev = cmd640_init_dev, #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED .set_pio_mode = cmd640_set_pio_mode, #endif + .test_irq = cmd640_test_irq, }; static int pci_conf1(void) |