linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Martin Lottermoser <Martin.Lottermoser@t-online.de>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	Borislav Petkov <petkovbb@gmail.com>
Subject: Re: PATA DMA problem leading to kernel panic on reading movie DVDs
Date: Tue, 19 May 2009 23:11:21 +0200	[thread overview]
Message-ID: <200905192311.22310.bzolnier@gmail.com> (raw)
In-Reply-To: <200905192131.00168.bzolnier@gmail.com>

On Tuesday 19 May 2009 21:30:59 Bartlomiej Zolnierkiewicz wrote:

[...]

> > The offer for testing patches remains open :-).
> 
> We will get there. ;-)
> 
> I've reproduced the problem and I'm testing the fix currently...

The following patch should fix OOPS w/ vanilla 2.6.30-rc6 and 40-wire cable:

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide: fix OOPS during ide-cd error recovery

On Tuesday 19 May 2009 20:29:28 Martin Lottermoser wrote:

>   hdc: cdrom_decode_status: error=0x40 <3>{ LastFailedSense=0x04 }
>   ide: failed opcode was: unknown
>   hdc: DMA disabled
>   ------------[ cut here ]------------
>   kernel BUG at drivers/ide/ide-io.c:872!

It is possible for ide-cd to ignore ide_error()'s return value under
some circumstances.  Workaround it in ide_intr() and ide_timer_expiry()
by checking if there is a device/port reset pending currently.

Reported-by: Martin Lottermoser <Martin.Lottermoser@t-online.de>
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
in the longer-term ide-cd should be fixed to not do such things
(too invasive for 2.6.30 and 2.6.29)

 drivers/ide/ide-io.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/drivers/ide/ide-io.c
===================================================================
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -696,7 +696,7 @@ void ide_timer_expiry (unsigned long dat
 		}
 		spin_lock_irq(&hwif->lock);
 		enable_irq(hwif->irq);
-		if (startstop == ide_stopped) {
+		if (startstop == ide_stopped && hwif->polling == 0) {
 			ide_unlock_port(hwif);
 			plug_device = 1;
 		}
@@ -868,7 +868,7 @@ irqreturn_t ide_intr (int irq, void *dev
 	 * same irq as is currently being serviced here, and Linux
 	 * won't allow another of the same (on any CPU) until we return.
 	 */
-	if (startstop == ide_stopped) {
+	if (startstop == ide_stopped && hwif->polling == 0) {
 		BUG_ON(hwif->handler);
 		ide_unlock_port(hwif);
 		plug_device = 1;


  reply	other threads:[~2009-05-19 21:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-17  9:12 PATA DMA problem leading to kernel panic on reading movie DVDs Martin Lottermoser
2009-05-17 10:42 ` Borislav Petkov
2009-05-17 11:15   ` Martin Lottermoser
2009-05-17 12:14     ` Martin Lottermoser
2009-05-17 19:34       ` Borislav Petkov
2009-05-17 19:45         ` Bartlomiej Zolnierkiewicz
2009-05-17 19:50           ` Borislav Petkov
2009-05-17 20:18             ` Bartlomiej Zolnierkiewicz
2009-05-17 20:30               ` Borislav Petkov
2009-05-17 22:48                 ` Bartlomiej Zolnierkiewicz
2009-05-18  6:32                   ` Borislav Petkov
2009-05-17 17:59 ` Robert Hancock
2009-05-17 19:35   ` Bartlomiej Zolnierkiewicz
2009-05-17 20:18     ` Martin Lottermoser
2009-05-18 16:40     ` Martin Lottermoser
2009-05-18 19:12     ` Martin Lottermoser
2009-05-19 15:19       ` Bartlomiej Zolnierkiewicz
2009-05-19 18:29         ` Martin Lottermoser
2009-05-19 19:30           ` Bartlomiej Zolnierkiewicz
2009-05-19 21:11             ` Bartlomiej Zolnierkiewicz [this message]
2009-05-19 21:12             ` Martin Lottermoser
2009-05-19 21:31               ` Bartlomiej Zolnierkiewicz

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=200905192311.22310.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=Martin.Lottermoser@t-online.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.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;
as well as URLs for NNTP newsgroup(s).