linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 8/12] triflex: add missing ->dma_base check
@ 2007-07-29 17:53 Bartlomiej Zolnierkiewicz
  2007-07-29 19:06 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-07-29 17:53 UTC (permalink / raw)
  To: linux-ide


If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks
shouldn't be initialized or bad things will happen.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/triflex.c |    3 +++
 1 file changed, 3 insertions(+)

Index: b/drivers/ide/pci/triflex.c
===================================================================
--- a/drivers/ide/pci/triflex.c
+++ b/drivers/ide/pci/triflex.c
@@ -111,6 +111,9 @@ static void __devinit init_hwif_triflex(
 	hwif->set_pio_mode = &triflex_set_pio_mode;
 	hwif->set_dma_mode = &triflex_set_mode;
 
+	if (hwif->dma_base == 0)
+		return;
+
 	hwif->atapi_dma  = 1;
 	hwif->mwdma_mask = 0x07;
 	hwif->swdma_mask = 0x07;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 8/12] triflex: add missing ->dma_base check
  2007-07-29 17:53 [PATCH 8/12] triflex: add missing ->dma_base check Bartlomiej Zolnierkiewicz
@ 2007-07-29 19:06 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2007-07-29 19:06 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide

Bartlomiej Zolnierkiewicz wrote:

> If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks
> shouldn't be initialized or bad things will happen.

> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-29 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-29 17:53 [PATCH 8/12] triflex: add missing ->dma_base check Bartlomiej Zolnierkiewicz
2007-07-29 19:06 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).