aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-06-15 12:53:00 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-06-15 12:53:00 -0400
commit3779f818a42879038c4be8bc83123432b774279d (patch)
treec5177aeb0858cdf85a0947d7cd407e9f70bd732a /drivers/ide
parentec053e4ee98b6e5a9ecf97754837b6fc989774f0 (diff)
sl82c105: implement test_irq() method
Implement test_irq() method. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/sl82c105.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/ide/sl82c105.c b/drivers/ide/sl82c105.c
index 88ac47085cd9..6246bea585c4 100644
--- a/drivers/ide/sl82c105.c
+++ b/drivers/ide/sl82c105.c
@@ -114,6 +114,16 @@ static void sl82c105_set_dma_mode(ide_drive_t *drive, const u8 speed)
114 drive->drive_data |= (unsigned long)drv_ctrl << 16; 114 drive->drive_data |= (unsigned long)drv_ctrl << 16;
115} 115}
116 116
117static int sl82c105_test_irq(ide_hwif_t *hwif)
118{
119 struct pci_dev *dev = to_pci_dev(hwif->dev);
120 u32 val, mask = hwif->channel ? CTRL_IDE_IRQB : CTRL_IDE_IRQA;
121
122 pci_read_config_dword(dev, 0x40, &val);
123
124 return (val & mask) ? 1 : 0;
125}
126
117/* 127/*
118 * The SL82C105 holds off all IDE interrupts while in DMA mode until 128 * The SL82C105 holds off all IDE interrupts while in DMA mode until
119 * all DMA activity is completed. Sometimes this causes problems (eg, 129 * all DMA activity is completed. Sometimes this causes problems (eg,
@@ -288,6 +298,7 @@ static const struct ide_port_ops sl82c105_port_ops = {
288 .set_pio_mode = sl82c105_set_pio_mode, 298 .set_pio_mode = sl82c105_set_pio_mode,
289 .set_dma_mode = sl82c105_set_dma_mode, 299 .set_dma_mode = sl82c105_set_dma_mode,
290 .resetproc = sl82c105_resetproc, 300 .resetproc = sl82c105_resetproc,
301 .test_irq = sl82c105_test_irq,
291}; 302};
292 303
293static const struct ide_dma_ops sl82c105_dma_ops = { 304static const struct ide_dma_ops sl82c105_dma_ops = {