Re: ATA error on 6.0-BETA4

From: Søren Schmidt <sos_at_FreeBSD.org>
Date: Sat, 17 Sep 2005 13:50:11 +0200
On 16/09/2005, at 22:22, Patrick Bowen wrote:
> Søren Schmidt wrote:
>> On 15/09/2005, at 3:40, Patrick Bowen wrote:
>>> I've notice the same behaviour on my Dell C600. I've attached   
>>> verbose dmesg's for -current and 5.4. When I boot 5.4 the CD-RW  
>>> is  found and I have no problems using it for either reading or   
>>> writing. I hope they're useful for you.
>> OK, please try the below patch and let me know if that helps any.
>>> I'd like to say that I have the greatest respect for *all* of  
>>> you  that work at making FreeBSD the great OS that it is. I just  
>>> wonder  where you find the time to work on it, what with your day  
>>> jobs,  family responsibilities and all...
>> I guess we have understanding environments and need for less  
>> sleep  than usual :)
>>
>> Index: ata-lowlevel.c
>> ===================================================================
>> RCS file: /home/ncvs/src/sys/dev/ata/ata-lowlevel.c,v
>> retrieving revision 1.71
>> diff -u -r1.71 ata-lowlevel.c
>> --- ata-lowlevel.c      14 Sep 2005 12:45:06 -0000      1.71
>> +++ ata-lowlevel.c      15 Sep 2005 07:35:41 -0000
>> _at__at_ -278,7 +278,7 _at__at_
>>             /* if read data get it */
>>             if (request->flags & ATA_R_READ) {
>> -               if (ata_wait(ch, atadev, (ATA_S_READY |  
>> ATA_S_DRQ)) <  0) {
>> +               if (ata_wait(ch, atadev, ATA_S_DRQ) < 0) {
>>                     device_printf(request->dev,
>>                                   "timeout waiting for read DRQ\n");
>>                     request->result = EIO;
>>
>>
>> Søren Schmidt
>> sos_at_FreeBSD.org
>>
>>
>>
>>
>>
> Søren:
>
> Outstanding! The drive is now recognized at boot, I can read and  
> write CD's, and even listen to audio CD's. It all seems to work!  
> Such a small change had a huge impact.

Good, I'll get this committed ASAP when I have a little more testing  
done.

> If you don't mind, what exactly was the purpose for making the  
> change (other than to make things work)?

ATAPI devices doesn't always set the READY flag, the reason being  
that they should not be picked up as ATA devices back when there was  
systems that didn't know about ATAPI.

ATA mkIII originally did the identify by polling the device so this  
wasn't used. Later I changed things to use the generic request  
processing logic but newer encountered this problem on any of the  
devices I routinely test with. Now I've found an old ATAPI cdrom that  
exhibits this behavior and added it to the pool of "must test these"  
device :)

Søren Schmidt
sos_at_FreeBSD.org
Received on Sat Sep 17 2005 - 09:50:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:43 UTC