From owner-freebsd-hackers Tue Aug 29 13:54:20 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id NAA23791 for hackers-outgoing; Tue, 29 Aug 1995 13:54:20 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id NAA23783 for ; Tue, 29 Aug 1995 13:54:10 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id GAA00059; Wed, 30 Aug 1995 06:51:12 +1000 Date: Wed, 30 Aug 1995 06:51:12 +1000 From: Bruce Evans Message-Id: <199508292051.GAA00059@godzilla.zeta.org.au> To: bde@zeta.org.au, vak@cronyx.ru Subject: Re: wd0 detect fails Cc: hackers@freebsd.org Sender: hackers-owner@freebsd.org Precedence: bulk [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