ATAPI_RESET hang fix
Brian Rogers
burpmaster at truffula.net
Tue Aug 24 18:43:34 PDT 2004
Søren Schmidt wrote:
> Brian Rogers wrote:
>
>> I was getting the hang on start after the "ATAPI_RESET time = x"
>> message. I stuck in a diagnostic printf before the ATAPI_RESET, and
>> that actually fixed the hang. So I replaced it with a DELAY(50), and
>> that also avoids the hang.
>>
>> I guess some ATAPI devices don't like being reset right after being
>> queried. (Or there is a bug with handling that in FreeBSD) Patch is
>> attached.
>
> Hmm, you could be on to something, but instead of using a fixed delay
> I'd rather (re)introduce the wait for ready before selecting the
> device in ata_command. Could you please try the following patch and
> let me know if that fixes the problem as well ?
It worked on the first try, but after that I couldn't reproduce it with
a DVD in the drive, or with the drive empty, so I think that was a
fluke. I tried about 5 times.
I noticed this morning that my patch doesn't work when a DVD is in the
drive. The drive must need more time in that case.
More information about the freebsd-current
mailing list