projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e98d6e5
)
triflex: add missing ->dma_base check
author
Bartlomiej Zolnierkiewicz
<
[email protected]
>
Mon, 20 Aug 2007 20:42:56 +0000
(22:42 +0200)
committer
Bartlomiej Zolnierkiewicz
<
[email protected]
>
Mon, 20 Aug 2007 20:42:56 +0000
(22:42 +0200)
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/triflex.c
patch
|
blob
|
history
diff --git
a/drivers/ide/pci/triflex.c
b/drivers/ide/pci/triflex.c
index 024bbfae0429d5b0cbcaa0595ec0b6b5958846c0..098692a6d615ff157c97cc55030b10ea883bf06d 100644
(file)
--- a/
drivers/ide/pci/triflex.c
+++ b/
drivers/ide/pci/triflex.c
@@
-115,6
+115,9
@@
static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
hwif->tuneproc = &triflex_tune_drive;
hwif->speedproc = &triflex_tune_chipset;
+ if (hwif->dma_base == 0)
+ return;
+
hwif->atapi_dma = 1;
hwif->mwdma_mask = 0x07;
hwif->swdma_mask = 0x07;