linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Robert Hancock <hancockrwd@gmail.com>
Cc: Martin Lottermoser <Martin.Lottermoser@t-online.de>,
	linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: PATA DMA problem leading to kernel panic on reading movie DVDs
Date: Sun, 17 May 2009 21:35:09 +0200	[thread overview]
Message-ID: <200905172135.10136.bzolnier@gmail.com> (raw)
In-Reply-To: <4A10509C.603@gmail.com>


On Sunday 17 May 2009 19:59:56 Robert Hancock wrote:
> Martin Lottermoser wrote:
> > Hello,
> > 
> > newer versions of the Linux kernel overestimate my DVD drive's
> > DMA capabilities, leading either to DMA being disabled or a kernel
> > panic.
> > 
> > My setup is:
> > 
> >   Motherboard: ASUS P4C800-E Deluxe
> >     South bridge: ICH5R
> >       IDE Interface Controller (PATA): Intel 82801EB/ER (PCI: 8086:24db)
> >   DVD drive: Samsung SH-S202N, attached as hdc.
> >     There is also an older CD writer (Lite-On LTR-52327S) attached as
> >     hdd.
> >   Operating system: Debian 5.0.0 with security updates
> > 
> > On upgrading from Debian 4.0 (Linux 2.6.18) to 5.0 (Linux 2.6.26) I
> > found that trying to play movie DVDs with vlc (VideoLAN media player)
> > led to DMA being disabled:
> > 
> >   hdc: cdrom_decode_status: status=0x51 { DriveReady SeekComplete Error }
> >   hdc: cdrom_decode_status: error=0x40 { LastFailedSense=0x04 }
> >   ide: failed opcode was: unknown
> >   <4 more identical groups of these messages>
> >   hdc: DMA disabled
> >   hdc: ide_intr: huh? expected NULL handler on exit
> >   hdc: ATAPI reset complete
> 
> Looks like kind of a comedy of errors. It failed to indicate what the 
> failed command was (though, it seems like the failed opcode is always 
> unknown with the IDE drivers), disabled DMA incorrectly, then seemingly 
> confused itself.
> 
> Seems like the IDE layer grew some regressions at some point. You could 
> try a newer (2.6.29) kernel. However, from a user perspective, quite 
               ^^^^^^

> likely you'll be happier ditching the IDE drivers and using libata 
> instead, it tends to be better tested these days..

Robert, recommending alternatives is of course fine, same cannot be said
about not reading the whole bug-report before making final conclusions...

> > 
> > The resulting configuration is too slow to play movies. I booted the
> > older kernel and everything was fine.
> > 
> > I then tested various versions of the Linux kernel where I happened to
> > have the original sources. The most interesting results were:
> > 
> >   2.6.22.9      works, no errors visible in syslog
> >   2.6.23.14     works, but syslog shows an error (see below)
> >   2.6.24.3	DMA disabled
> >   2.6.29.3	Kernel panic: Fatal exception in interrupt (ide_intr)
      ^^^^^^^^

> >                 on trying to open the DVD with vlc
> > 
> > The error message with 2.6.23.14 was:
> > 
> >   hdc: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
> >   hdc: drive_cmd: error=0x04 { AbortedCommand }
> >   ide: failed opcode was: 0xec

This is more-or-less innocent -- some user-space utility wrongly uses
ATA IDENTIFY command on ATAPI devices and it gets logged as an error...

> > This kernel as well as 2.6.22.9 also showed the following on booting:
> > 
> >   hdc: host side 80-wire cable detection failed, limiting max speed to UDMA33
> > 
> > This is correct: the drive is only capable of Ultra DMA mode 2 33.3 MB/s
> > (see manufacturer's documentation) and is attached with a standard 40-wire
> > ATA cable (black connectors for master and slave).

Martin, this is one of ATAPI drives which support UDMA66 but have broken
cable detection.  Since 2.6.26 we have a special quirk for it ide (commit
3ced5c49bd2d1f2c7f769e3a54385883de63a652) and subsequent one in libata
(commit e9f3340673c1da32041f2a282b166c72cd78632e).

In your system's case the cable detection doesn't seem to work properly
which in turn results in all kind of later problems.

It could be that the quirk itself needs to be revised (I wonder if it was
originally tested with 40-wires cable) or maybe we need some other cable
detection fix...

Please:

* send 'hdparm --Istdout /dev/hdc' output

* try 2.6.30-rc6 (maybe 2.6.29.3 oops has been fixed already and we just
  need to backport it)

also connecting the drive using 80-wires cable and getting another hdparm
output (+ seeing if it helps the other problems) would be very useful.

PS guys, please remember to cc: linux-ide.

Thanks.
Bart

  reply	other threads:[~2009-05-17 19:31 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 [this message]
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
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=200905172135.10136.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=Martin.Lottermoser@t-online.de \
    --cc=hancockrwd@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).