Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 1996 17:53:51 -0700
From:      Order Information <info@cdrom.com>
To:        r3cgm@cdrom.com
Subject:   Re: bug in driver 
Message-ID:  <199607240053.RAA01175@wc.cdrom.com>
Resent-Message-ID: <29460.838764302@time.cdrom.com>
In-Reply-To: Your message of "Mon, 22 Jul 1996 16:38:30 %2B0200." <199607221438.QAA21299@dutian.twi.tudelft.nl> 

next in thread | previous in thread | raw e-mail | index | archive | help


Send this to whoever is supposed to see it.

-Info

"J.M.W. Kooijman" <kooijman@dutian.twi.tudelft.nl> 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<NWD && wddrives[lunit]; ++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




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