Re: Latest kernel couldn't probe DVD-Drive in Secondary/Slave

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 18 Dec 2003 12:31:51 -0500 (EST)
On 18-Dec-2003 Soren Schmidt wrote:
> It seems MIHIRA Sanpei Yoshiro wrote:
>> >>  After updating kernel in -current machine, DVD-Drive in ATA
>> >>Secondary/Slave was not probed.
>> >>
>> >>  If I back out sys/dev/ata/ata-lowlevel.c rev. 1.24, I could probe
>> >>it.
>> >
>> >  With sys/dev/ata/ata-lowlevel.c rev. 1.25, I could probe DVD-Drive
>> >in ATA Secondary/Slave channel.
>> >
>> >  Thank you, SOS.
>> >
>> >  And I hope to commit this change into RELENG_5.2(for 5.2-RELEASE).
>> 
>>   I think Sxren Schmidt forgot commit above change in RELENG_5.2.
>> 
>>   Do you have any plan to solve above problem, Sxren Schmidt.
> 
> I need a little time thats all as I'm flooded with work currently.

Is this the correct diff:

cvs diff: Diffing .
Index: ata-lowlevel.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/ata/ata-lowlevel.c,v
retrieving revision 1.24
diff -u -r1.24 ata-lowlevel.c
--- ata-lowlevel.c      3 Dec 2003 15:32:53 -0000       1.24
+++ ata-lowlevel.c      18 Dec 2003 16:53:45 -0000
_at__at_ -606,10 +606,14 _at__at_
        if (mask == 0x02)       /* wait for slave only */
            if (!(stat1 & ATA_S_BUSY) || (stat1 == 0xff && timeout > 20))
                break;
-       if (mask == 0x03)       /* wait for both master & slave */
-           if ((!(stat0 & ATA_S_BUSY) || (stat0 == 0xff && timeout > 20)) &&
-               (!(stat1 & ATA_S_BUSY) || (stat1 == 0xff && timeout > 20)))
+       if (mask == 0x03) {     /* wait for both master & slave */
+           if (!(stat0 & ATA_S_BUSY) && !(stat1 & ATA_S_BUSY))
                break;
+           if (stat0 == 0xff && timeout > 20)
+               mask &= ~0x01;
+           if (stat1 == 0xff && timeout > 20)
+               mask &= ~0x02;
+       }
        DELAY(100000);
     }  


I can commit it for you if you don't have the time.

-- 

John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
Received on Thu Dec 18 2003 - 08:41:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:34 UTC