Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 1995 06:51:12 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, vak@cronyx.ru
Cc:        hackers@freebsd.org
Subject:   Re: wd0 detect fails
Message-ID:  <199508292051.GAA00059@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
[old]
>>   !       if (wdwait(du, WDCS_READY | WDCS_SEEKCMPLT, TIMEOUT) != 0
>>   !           || (du->dk_error = inb(wdc + wd_error)) != 0x01)

[new]
>>   !       if (wdwait(du, 0, TIMEOUT) != 0)
>>   !               return (1);
>>   !       du->dk_status = inb(wdc + wd_status);
>>   !       du->dk_error = inb(wdc + wd_error);
>>   !       if ((du->dk_status & ~(WDCS_READY | WDCS_SEEKCMPLT)) != 0 ||
>>   !           du->dk_error != 0x01)

>I'm not sure that this code is 100% correct.
>Old version did not work for some CD-ROMs,
>current one seems to fail for some disks. :-(

>Unfortunately, ATA specs cannot help much here,
>just as ATAPI specs cannot help in CD-ROM probing.
>Manufacturers never read specifications. :-)

A user reported that the status was 0x52 for the old code (0x02 = IDX).
The spec says 0x50 :-).

We could ignore some bits, perhaps all except 0x51, but the old code
essentially ignored all except 0x50 (and BUSY).  Why did it fail exactly?
We could ignore failures from reset, at least in the probe, and depend
on the results of WDCC_DIAGNOSE.

>>   The new code also has some changes involving the b_active state.  These
>>   seemed OK.

>If so, what about removing the ATAPI option and enable ATAPI
>support by default?

I only understand the !ATAPI case.  How hard would it be to make the
atapi driver an lkm?

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508292051.GAA00059>