From owner-freebsd-hackers Tue Jul 30 15:05:25 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA11626 for hackers-outgoing; Tue, 30 Jul 1996 15:05:25 -0700 (PDT) Received: from time.cdrom.com (time.cdrom.com [204.216.27.226]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA11605 for ; Tue, 30 Jul 1996 15:05:18 -0700 (PDT) Received: from time.cdrom.com (localhost [127.0.0.1]) by time.cdrom.com (8.7.5/8.6.9) with ESMTP id PAA29462 for ; Tue, 30 Jul 1996 15:05:02 -0700 (PDT) Prev-Resent: Tue, 30 Jul 1996 15:05:02 -0700 Prev-Resent: "hackers@freebsd.org " Received: from freefall.freebsd.org (jkh-sl0-o.cdrom.com [204.216.27.193]) by time.cdrom.com (8.7.5/8.6.9) with ESMTP id NAA26985 for ; Tue, 30 Jul 1996 13:21:50 -0700 (PDT) Received: from wc.cdrom.com (wc.cdrom.com [204.216.28.155]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id NAA03831 for ; Tue, 30 Jul 1996 13:22:02 -0700 (PDT) Received: (from r3cgm@localhost) by wc.cdrom.com (8.6.12/8.6.12) id NAA28476 for jkh; Tue, 30 Jul 1996 13:21:31 -0700 Received: from localhost.cdrom.com (localhost.cdrom.com [127.0.0.1]) by wc.cdrom.com (8.6.12/8.6.12) with SMTP id RAA01175 for ; Tue, 23 Jul 1996 17:53:51 -0700 Message-Id: <199607240053.RAA01175@wc.cdrom.com> X-Authentication-Warning: wc.cdrom.com: Host localhost.cdrom.com didn't use HELO protocol To: r3cgm@cdrom.com Subject: Re: bug in driver In-reply-to: Your message of "Mon, 22 Jul 1996 16:38:30 +0200." <199607221438.QAA21299@dutian.twi.tudelft.nl> Date: Tue, 23 Jul 1996 17:53:51 -0700 From: Order Information Resent-To: hackers@freebsd.org Resent-Date: Tue, 30 Jul 1996 15:05:02 -0700 Resent-Message-ID: <29460.838764302@time.cdrom.com> Resent-From: "Jordan K. Hubbard" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Send this to whoever is supposed to see it. -Info "J.M.W. Kooijman" said... >Dear Sirs, >I recently downloaded the ide/cdrom-driver from your FreeBSD(stable)- >directory (files ../src/sys/i386/isa/wd.c, atapi.c and wcd.c c.a.). >I discovered several bugs when trying to include the driver in the >kernel. In the first place the code that checks free IDE drives in >wdattach() in wd.c never reaches the atapi_attach()-call in normal >circumstances. Consequently, the cdrom-device, that is a slave to the >ide-controller is never attached. This is because of the goto-jump >(Dykstra apparently lived in vain, warning about this). I wrote >the following replacement-code: > >#ifdef ATAPI > /* > * Probe all free IDE units, searching for ATAPI drives. > */ > for (unit=0; unit<2; ++unit) { > for (lunit=0; lunit if (!(wddrives[lunit]->dk_ctrlr == dvp->id_unit && > wddrives[lunit]->dk_unit == unit)){ > printf("Attempt atapi_attach ctlr %d unit %d\n",dvp->id_unit, > unit); > if (!atapi_attach (dvp->id_unit, unit, dvp->id_iobase, > &kdc_wdc[dvp->id_unit])) > printf("Attempt atapi_attach not succeeded\n"); > } > else { > printf("ctrlr %d unit %d not free\n",dvp->id_unit,unit); > } > } >next: printf("End of probe of free IDE units\n"); >#endif > >This works, provided the incorrect switches around ATAPI_STATIC in >atapi.c and atapi.h (which now cause the wrong parts of the source >to be compiled) are corrected. >I was amazed that you allow this stuff on your website. Has no one >else complained? >Sincerely, >Joe Kooijman >kooijman@dutian.twi.tudelft.nl