Latest kernel couldn't probe DVD-Drive in Secondary/Slave
John Baldwin
jhb at FreeBSD.org
Thu Dec 18 09:41:01 PST 2003
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
@@ -606,10 +606,14 @@
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/
More information about the freebsd-current
mailing list