Rockbox mail archive
Subject: Re: Red freeze
From: Mike Holden (rockbox_at_mikeholden.uklinux.net)
Björn Stenberg said:
> Mike Holden wrote:
>> We hit a disk error and the mpeg thread skips to the next track. It
>> then tries to start loading the next track, and gets as far as the
>> perform_soft_reset() at the top of ata_read_sectors(). This calls
>> wait_for_rdy() which calls wait_for_busy(). Both of these function
>> calls will wait for 10 seconds each before timing out and returning.
> Only if the disk is actually BSY for all that time. Why would it be? On
> read error, the disk is immediately available for new commands.
Ok, let me try to explain that bit again!
wait_for_rdy calls wait_for_bsy.
If the disk is NOT busy, wait_for_bsy immediately returns 1.
In this case, wait_for_rdy sets a 10 second timeout and waits for the disk
to become STATUS_RDY - it's this bit that times out, since the disk shows
an error state. We sleep for 10 seconds, then return an error (zero). We
then loop round the soft reset a further 8 times, for a total of 90
Any comment on the other points I made?
Page was last modified "Jan 10 2012" The Rockbox Crew