* Re: ide-cd turning off DMA when verifying DVD-R [not found] ` <20060113083009.GE12338@paradise.net.nz> @ 2006-01-13 9:19 ` Bartlomiej Zolnierkiewicz 2006-01-13 13:03 ` Ondrej Zary ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2006-01-13 9:19 UTC (permalink / raw) To: Volker Kuhlmann; +Cc: linux-kernel, linux-ide, Jens Axboe Hi, On 1/13/06, Volker Kuhlmann <list0570@paradise.net.nz> wrote: > On Fri 13 Jan 2006 17:40:33 NZDT +1300, Robert Hancock wrote: > > > I'm thinking the IDE code is too aggressive in assuming that the failure > > is because of a DMA problem and disabling it.. Most likely all that's > > happening is the drive is taking a long time to complete the current > > command. What actually happened is that normal command timed out and because of that driver reset the device which caused it to loose DMA: ->ide_atapi_error() ->ide_do_reset() ->pre_reset() ->check_dma_crc() ->__ide_dma_off() Somebody needs to investigate why __ide_dma_off() is called et all and if we need to restore DMA after reset (don't count ATM on me, I'm buried by bugreports). Ondrej, could you fill the bug at http://bugzilla.kernel.org so we don't lose it? > Yes! Each time when inserting a faulty CD/DVD, or whenever the drive > gives read errors for whatever reason, the kernel decides to turn DMA > off and try again, fail (again) and leave DMA off. And this after having > successfully used DMA before - so it's not that the device is > DMA-incapable. This is a separate issue and is related to retrying failed DMA commands. Driver doesn't know what was the cause of the timeout and it shouldn't disable DMA for the device (only the failed request should be retried in PIO mode). Any takers? :) PS1 please don't trim cc: list PS2 please use linux-ide@vger.kernel.org for ATA problem Thanks, Bartlomiej ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ide-cd turning off DMA when verifying DVD-R 2006-01-13 9:19 ` ide-cd turning off DMA when verifying DVD-R Bartlomiej Zolnierkiewicz @ 2006-01-13 13:03 ` Ondrej Zary [not found] ` <58cb370e0601130121s2f6c0a26jda00ff64df197342@mail.gmail.com> 2006-01-13 14:06 ` Rashkae 2 siblings, 0 replies; 7+ messages in thread From: Ondrej Zary @ 2006-01-13 13:03 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz Cc: Volker Kuhlmann, linux-kernel, linux-ide, Jens Axboe Bartlomiej Zolnierkiewicz wrote: > Ondrej, could you fill the bug at > http://bugzilla.kernel.org so we don't lose it? > Here it is http://bugzilla.kernel.org/show_bug.cgi?id=5882 -- Ondrej Zary ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <58cb370e0601130121s2f6c0a26jda00ff64df197342@mail.gmail.com>]
[parent not found: <20060113093818.GA22984@sci.fi>]
[parent not found: <58cb370e0601130149g32323b4axbf0ac55f83ac9148@mail.gmail.com>]
[parent not found: <20060113112510.GA23264@sci.fi>]
* Re: Fwd: ide-cd turning off DMA when verifying DVD-R [not found] ` <20060113112510.GA23264@sci.fi> @ 2006-01-13 13:33 ` Bartlomiej Zolnierkiewicz 2006-01-13 14:24 ` Alan Cox 0 siblings, 1 reply; 7+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2006-01-13 13:33 UTC (permalink / raw) To: Ville Syrjälä Cc: Ondrej Zary, Robert Hancock, Volker Kuhlmann, Jens Axboe, linux-ide, linux-kernel I'm adding missing cc:, I hope I didn't forget about anybody this time. There is now bugzilla entry for this bug (thanks Ondrej): http://bugzilla.kernel.org/show_bug.cgi?id=5882 Jens, could you take a look at the part related to ide-cd timeouts? On 1/13/06, Ville Syrjälä <syrjala@sci.fi> wrote: > On Fri, Jan 13, 2006 at 10:49:22AM +0100, Bartlomiej Zolnierkiewicz wrote: > > On 1/13/06, Ville Syrjälä <syrjala@sci.fi> wrote: > > > On Fri, Jan 13, 2006 at 10:21:44AM +0100, Bartlomiej Zolnierkiewicz wrote: > > > > On 1/13/06, Volker Kuhlmann <list0570@paradise.net.nz> wrote: > > > > > On Fri 13 Jan 2006 17:40:33 NZDT +1300, Robert Hancock wrote: > > > > > > > > > > > I'm thinking the IDE code is too aggressive in assuming that the failure > > > > > > is because of a DMA problem and disabling it.. Most likely all that's > > > > > > happening is the drive is taking a long time to complete the current > > > > > > command. > > > > > > > > What actually happened is that normal command timed out > > > > and because of that driver reset the device which caused > > > > it to loose DMA: > > > > > > > > ->ide_atapi_error() > > > > ->ide_do_reset() > > > > ->pre_reset() > > > > ->check_dma_crc() > > > > ->__ide_dma_off() > > > > > > > > Somebody needs to investigate why __ide_dma_off() is called > > > > et all and if we need to restore DMA after reset (don't count ATM > > > > on me, I'm buried by bugreports). Ondrej, could you fill the bug at > > > > http://bugzilla.kernel.org so we don't lose it? > > > > > > It looks like this has been fixed recently. In 2.6.14-rc4-mm1 > > > check_dma_crc() used to call __ide_dma_off() when no CRC errors were > > > registered. The bug has been fixed before 2.6.15-rc5-mm1. I'm still > > > running 2.6.14-rc4-mm1 on my burning system so I haven't actually tested > > > this on a recent kernel. > > > > I don't see it being fixed, could you point me at the patch? > > It seems the patch was carried along during the 2.6.15-rc-mm series but > was later dropped. > > Here it is: > http://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.15-rc5/2.6.15-rc5-mm3/broken-out/ide-promise-flushing-hang-fix.patch > > There's a bunch of other stuff in that patch besides the __ide_dma_off() > change. Maybe that approach isn't correct and just increasing some > timeout value would work. LG burners are just really slow recognizing > discs. The patch was NACK-ed by Alan Cox and I agree with him (this should be done differently). This __ide_dma_off() chunk looks sensible but does it fix the issue? I was under impression that after a reset drive looses its DMA xfer mode and needs to be reprogrammed (ATA spec has the answer). > I just took some random discs from my colletion and measured the time it > took for the drive to recognize them. > > ~12 seconds for CD-R > ~15 seconds for some DVD+R > ~27 seconds for some DVD+R > > I'm not sure why it takes so long for some discs. I know they aren't > bad burns because my laptop DVD-ROM drive, which is more sensitive to > disc quality than the LG, can read them without any problems and it > recognizes them in a few seconds. I'll let Jens comment on this one. :) Bartlomiej ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fwd: ide-cd turning off DMA when verifying DVD-R 2006-01-13 13:33 ` Fwd: " Bartlomiej Zolnierkiewicz @ 2006-01-13 14:24 ` Alan Cox 2006-01-13 15:51 ` Rashkae 0 siblings, 1 reply; 7+ messages in thread From: Alan Cox @ 2006-01-13 14:24 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz Cc: Ville Syrjälä, Ondrej Zary, Robert Hancock, Volker Kuhlmann, Jens Axboe, linux-ide, linux-kernel On Gwe, 2006-01-13 at 14:33 +0100, Bartlomiej Zolnierkiewicz wrote: > The patch was NACK-ed by Alan Cox and I agree with him (this should be > done differently). This __ide_dma_off() chunk looks sensible but does it fix > the issue? I was under impression that after a reset drive looses its DMA > xfer mode and needs to be reprogrammed (ATA spec has the answer). Yes and the behaviour is determined by hdparm -k/-K. Its all a bit random after a CRC error however as the recovery code does a polling speed change and the locking versus timers/irq's is totally broken. I did some minimal fixes in the older -ac patches but even with all the other locking cleanup I did back then this one remained. Essentially the old IDE layer needs to switch from polled speed changes in task context to issuing speed changes as state machine sequences. Thats non trivial Alan ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fwd: ide-cd turning off DMA when verifying DVD-R 2006-01-13 14:24 ` Alan Cox @ 2006-01-13 15:51 ` Rashkae 0 siblings, 0 replies; 7+ messages in thread From: Rashkae @ 2006-01-13 15:51 UTC (permalink / raw) To: Alan Cox Cc: Bartlomiej Zolnierkiewicz, Ville Syrjälä, Ondrej Zary, Robert Hancock, Volker Kuhlmann, Jens Axboe, linux-ide, linux-kernel On Fri, Jan 13, 2006 at 02:24:25PM +0000, Alan Cox wrote: > On Gwe, 2006-01-13 at 14:33 +0100, Bartlomiej Zolnierkiewicz wrote: > > The patch was NACK-ed by Alan Cox and I agree with him (this should be > > done differently). This __ide_dma_off() chunk looks sensible but does it fix > > the issue? I was under impression that after a reset drive looses its DMA > > xfer mode and needs to be reprogrammed (ATA spec has the answer). > > Yes and the behaviour is determined by hdparm -k/-K. Its all a bit Great theory, but unfortunately, as things are now, -k does not preserve DMA setting, contrary to it's documented function. Quote from Bartlomiej Zolnierkiewicz: AFAIR (2.5/2.6 and probably 2.4 also) it never worked w.r.t. to DMA as documented in hdparm manual. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ide-cd turning off DMA when verifying DVD-R 2006-01-13 9:19 ` ide-cd turning off DMA when verifying DVD-R Bartlomiej Zolnierkiewicz 2006-01-13 13:03 ` Ondrej Zary [not found] ` <58cb370e0601130121s2f6c0a26jda00ff64df197342@mail.gmail.com> @ 2006-01-13 14:06 ` Rashkae 2006-01-13 14:16 ` Bartlomiej Zolnierkiewicz 2 siblings, 1 reply; 7+ messages in thread From: Rashkae @ 2006-01-13 14:06 UTC (permalink / raw) To: linux-ide On Fri, Jan 13, 2006 at 10:19:17AM +0100, Bartlomiej Zolnierkiewicz wrote: > On 1/13/06, Volker Kuhlmann <list0570@paradise.net.nz> wrote: > > On Fri 13 Jan 2006 17:40:33 NZDT +1300, Robert Hancock wrote: > > > > > I'm thinking the IDE code is too aggressive in assuming that the failure > > > is because of a DMA problem and disabling it.. Most likely all that's > > > happening is the drive is taking a long time to complete the current > > > command. > > What actually happened is that normal command timed out > and because of that driver reset the device which caused > it to loose DMA: > > ->ide_atapi_error() > ->ide_do_reset() > ->pre_reset() > ->check_dma_crc() > ->__ide_dma_off() > > Somebody needs to investigate why __ide_dma_off() is called > et all and if we need to restore DMA after reset (don't count ATM > on me, I'm buried by bugreports). Ondrej, could you fill the bug at > http://bugzilla.kernel.org so we don't lose it? Shouldn't whether DMA is restored after reset be governed by keepsettings flag? From the hdparm man page: -k Get/set the keep_settings_over_reset flag for the drive. When this flag is set, the driver will pre serve the -dmu options over a soft reset, (as done during the error recovery sequence). I was a little disapointed that this didn't work as advertised. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: ide-cd turning off DMA when verifying DVD-R 2006-01-13 14:06 ` Rashkae @ 2006-01-13 14:16 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 7+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2006-01-13 14:16 UTC (permalink / raw) To: Rashkae Cc: Ville Syrjälä, Ondrej Zary, Robert Hancock, Volker Kuhlmann, Jens Axboe, linux-ide, linux-kernel On 1/13/06, Rashkae <rashkae@tigershaunt.com> wrote: > On Fri, Jan 13, 2006 at 10:19:17AM +0100, Bartlomiej Zolnierkiewicz wrote: > > > > On 1/13/06, Volker Kuhlmann <list0570@paradise.net.nz> wrote: > > > On Fri 13 Jan 2006 17:40:33 NZDT +1300, Robert Hancock wrote: > > > > > > > I'm thinking the IDE code is too aggressive in assuming that the failure > > > > is because of a DMA problem and disabling it.. Most likely all that's > > > > happening is the drive is taking a long time to complete the current > > > > command. > > > > What actually happened is that normal command timed out > > and because of that driver reset the device which caused > > it to loose DMA: > > > > ->ide_atapi_error() > > ->ide_do_reset() > > ->pre_reset() > > ->check_dma_crc() > > ->__ide_dma_off() > > > > Somebody needs to investigate why __ide_dma_off() is called > > et all and if we need to restore DMA after reset (don't count ATM > > on me, I'm buried by bugreports). Ondrej, could you fill the bug at > > http://bugzilla.kernel.org so we don't lose it? > > Shouldn't whether DMA is restored after reset be governed by keepsettings flag? settings should always be preserved and keepsettings flag should die > From the hdparm man page: > > -k Get/set the keep_settings_over_reset flag for the > drive. When this flag is set, the driver will pre > serve the -dmu options over a soft reset, (as done > during the error recovery sequence). > > I was a little disapointed that this didn't work as advertised. AFAIR (2.5/2.6 and probably 2.4 also) it never worked w.r.t. to DMA as documented in hdparm manual. Bartlomiej ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-01-13 15:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5ujmU-1UQ-665@gated-at.bofh.it>
[not found] ` <5uoqr-Qq-7@gated-at.bofh.it>
[not found] ` <43C72F41.5060207@shaw.ca>
[not found] ` <20060113083009.GE12338@paradise.net.nz>
2006-01-13 9:19 ` ide-cd turning off DMA when verifying DVD-R Bartlomiej Zolnierkiewicz
2006-01-13 13:03 ` Ondrej Zary
[not found] ` <58cb370e0601130121s2f6c0a26jda00ff64df197342@mail.gmail.com>
[not found] ` <20060113093818.GA22984@sci.fi>
[not found] ` <58cb370e0601130149g32323b4axbf0ac55f83ac9148@mail.gmail.com>
[not found] ` <20060113112510.GA23264@sci.fi>
2006-01-13 13:33 ` Fwd: " Bartlomiej Zolnierkiewicz
2006-01-13 14:24 ` Alan Cox
2006-01-13 15:51 ` Rashkae
2006-01-13 14:06 ` Rashkae
2006-01-13 14:16 ` Bartlomiej Zolnierkiewicz
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).