]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Sun, 7 Jun 2009 13:37:04 +0000 (15:37 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 7 Jun 2009 13:37:04 +0000 (15:37 +0200)
The driver's dma_lost_irq() and dma_clear() methods call pdc202xx_reset()
which resets both channels at once -- most probably by driving RESET- on them.
Not only such reset can severely disturb concurrent operations on another
channel, it is also a clear overkill (especially in the first case) and is
completely unexpected and thus not properly handled by the IDE core in this
context (in the second case the usual SRST reset would most probably ensue
anyway though); it also causes quite arbitrary 2-second delay. Hence, use the
standard ide_dma_lost_irq() method and don't install the optional dma_clear()
method at all -- the driver should do well without this age-old cruft...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/pdc202xx_old.c

index 668f452d74e95c813452eeae7e26a7cf4e77b6e0..494b5404f27720bcec37587fc48c4fd1a64374da 100644 (file)
@@ -219,12 +219,6 @@ static void pdc202xx_reset(ide_drive_t *drive)
        ide_set_max_pio(drive);
 }
 
-static void pdc202xx_dma_lost_irq(ide_drive_t *drive)
-{
-       pdc202xx_reset(drive);
-       ide_dma_lost_irq(drive);
-}
-
 static int init_chipset_pdc202xx(struct pci_dev *dev)
 {
        unsigned long dmabase = pci_resource_start(dev, 4);
@@ -295,9 +289,8 @@ static const struct ide_dma_ops pdc2026x_dma_ops = {
        .dma_start              = pdc202xx_dma_start,
        .dma_end                = pdc202xx_dma_end,
        .dma_test_irq           = ide_dma_test_irq,
-       .dma_lost_irq           = pdc202xx_dma_lost_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
        .dma_timer_expiry       = ide_dma_sff_timer_expiry,
-       .dma_clear              = pdc202xx_reset,
        .dma_sff_read_status    = ide_dma_sff_read_status,
 };