mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Glenn Wurster <gwurster@scs.carleton.ca>, Alan Cox <alan@redhat.com>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
	andre@linux-ide.org
Subject: Re: [PATCH] ide-dma.c, ide.c, ide.h, kernel 2.4.24
Date: Sat, 24 Jan 2004 00:45:56 +0100	[thread overview]
Message-ID: <200401240045.56966.bzolnier@elka.pw.edu.pl> (raw)
In-Reply-To: <20040123220958.GA891@desktop>


On Friday 23 of January 2004 23:09, Glenn Wurster wrote:
> > > Brief Synopsis:
> > >
> > > IDE initialization on non-DMA controllers causes OOPS during boot
> > > due to dereference of null function pointers.
> >
> > Linus - I am ok with this but for 2.6 Bart needs to look at it I guess
>
> I tried out the 2.6.1 kernel quickly and it did not exhibit the same
> obvious problems oopsing with dma and the ide controller as the latest
> 2.4 kernels (on my hardware at least).  It booted up nicely without a
> problem on unmodified source.  Whether or not the problem occurs for
> other types of hardware I can't say.

Hi,

[ Sorry for delay. ]

Glenn, your patch hides potential problems - these functions shouldn't be
called if host doesn't support DMA.  However there is one place when
->ide_dma_host_off() shouldn't be called unconditionally, here is a patch.
It is not pretty but at least consistent - we check hwif->ide_dma_check
to see if DMA is supported in other places too.  Does it fix the problem?
 
Are you sure that it doesn't happen on 2.6.1?  Maybe you've used a bit
different config (ie. compiled without DMA support)?

Cheers,
--bart

--- ide-iops.c.orig	2003-12-06 17:47:27.000000000 +0100
+++ ide-iops.c	2004-01-24 00:17:32.129567576 +0100
@@ -912,7 +912,8 @@
 //		ide_delay_50ms();
 
 #if defined(CONFIG_BLK_DEV_IDEDMA) && !defined(CONFIG_DMA_NONPCI)
-	hwif->ide_dma_host_off(drive);
+	if (hwif->ide_dma_check)	/* check if host supports DMA */
+		hwif->ide_dma_host_off(drive);
 #endif /* (CONFIG_BLK_DEV_IDEDMA) && !(CONFIG_DMA_NONPCI) */
 
 	/*


  reply	other threads:[~2004-01-23 23:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-23 18:32 Glenn Wurster
2004-01-23 21:33 ` Alan Cox
2004-01-23 22:09   ` Glenn Wurster
2004-01-23 23:45     ` Bartlomiej Zolnierkiewicz [this message]
2004-01-27  5:52       ` Glenn Wurster
2004-01-27 15:14         ` Bartlomiej Zolnierkiewicz
2004-01-27 16:41           ` Glenn Wurster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401240045.56966.bzolnier@elka.pw.edu.pl \
    --to=b.zolnierkiewicz@elka.pw.edu.pl \
    --cc=alan@redhat.com \
    --cc=andre@linux-ide.org \
    --cc=gwurster@scs.carleton.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®