Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=76e1faa7cfd464fa06a9c2cafd633d643daafeae
Commit:     76e1faa7cfd464fa06a9c2cafd633d643daafeae
Parent:     88b47040f8365ad56ecfd4103e964ba9b695987e
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 20 22:42:57 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Mon Aug 20 22:42:57 2007 +0200

    hpt34x: fix CONFIG_HPT34X_AUTODMA=n handling
    
    Programming DMA mode may destroy current PIO mode setting so if
    CONFIG_HPT34X_AUTODMA=n (the default case) make ide_tune_dma() fail
    early by disabling all host DMA masks and re-tune PIO mode.
    
    This fix doesn't help with the driver being broken but is needed
    for some other changes.
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/pci/hpt34x.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
index 19778c5..cb8fe56 100644
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -89,11 +89,7 @@ static int hpt34x_config_drive_xfer_rate (ide_drive_t *drive)
        drive->init_speed = 0;
 
        if (ide_tune_dma(drive))
-#ifndef CONFIG_HPT34X_AUTODMA
                return -1;
-#else
-               return 0;
-#endif
 
        if (ide_use_fast_pio(drive))
                hpt34x_tune_drive(drive, 255);
@@ -160,9 +156,11 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
        if (!hwif->dma_base)
                return;
 
+#ifdef CONFIG_HPT34X_AUTODMA
        hwif->ultra_mask = 0x07;
        hwif->mwdma_mask = 0x07;
        hwif->swdma_mask = 0x07;
+#endif
 
        hwif->ide_dma_check = &hpt34x_config_drive_xfer_rate;
        if (!noautodma)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to