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

    pdc202xx_old: add missing ->dma_base check
    
    If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks
    shouldn't be initialized or bad things will happen.
    
    Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/pci/pdc202xx_old.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index fbcb0bb..e19a891 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -1,5 +1,5 @@
 /*
- *  linux/drivers/ide/pci/pdc202xx_old.c       Version 0.50    Mar 3, 2007
+ *  linux/drivers/ide/pci/pdc202xx_old.c       Version 0.51    Jul 27, 2007
  *
  *  Copyright (C) 1998-2002            Andre Hedrick <[EMAIL PROTECTED]>
  *  Copyright (C) 2006-2007            MontaVista Software, Inc.
@@ -337,15 +337,18 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
 
        hwif->speedproc = &pdc202xx_tune_chipset;
 
+       hwif->err_stops_fifo = 1;
+
        hwif->drives[0].autotune = hwif->drives[1].autotune = 1;
 
+       if (hwif->dma_base == 0)
+               return;
+
        hwif->ultra_mask = hwif->cds->udma_mask;
        hwif->mwdma_mask = 0x07;
        hwif->swdma_mask = 0x07;
        hwif->atapi_dma = 1;
 
-       hwif->err_stops_fifo = 1;
-
        hwif->ide_dma_check = &pdc202xx_config_drive_xfer_rate;
        hwif->dma_lost_irq = &pdc202xx_dma_lost_irq;
        hwif->dma_timeout = &pdc202xx_dma_timeout;
-
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