From owner-freebsd-questions Sun May 26 02:49:40 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA17192 for questions-outgoing; Sun, 26 May 1996 02:49:40 -0700 (PDT) Received: from ax433.mclink.it (ax433.mclink.it [192.106.166.93]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id CAA17184 for ; Sun, 26 May 1996 02:49:35 -0700 (PDT) Received: from tirm47.vol.it by ax433.mclink.it id aa04674; 26 May 96 11:49 CEST Message-ID: <31A82987.41C67EA6@mclink.it> Date: Sun, 26 May 1996 11:51:03 +0200 From: Marco Masotti X-Mailer: Mozilla 2.01 (X11; I; FreeBSD 2.1-STABLE i386) MIME-Version: 1.0 To: questions@freebsd.org CC: mc7953@mclink.it Subject: RE: atapi-cdrom as master Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I've never been able to utilize my ATAPI Cdrom drive with 2.1R or stable with a fairly old hardware I own. However, just applying the patch below copied, I've at last got my CD unit working. I believe also that the patch is really a a sort of "cut"... but in my case it did work well. With the recurring problems in handling ATAPI drives, I considered patching the wd.c code, despite I've seen no reply (unless I missed some message around) to the Werner article, in the positive or negative. Since I'm somewhat believing that such a patch is temporary palliative to a real problem, can someone state what negative impact could this fix lead to? My hardware is: SiS 486 P3 Green PC (bios 24/12/1994), 24Mram, Intel 486 Overdrive DX4 IDE controller P2630VL ATAPI Mtsumi FX400 Cd drive The primary controller has two hard disks installed The secondary one has only the CD drive as master. Regards, Marco > > From: Werner Griessl > Date: Fri, 3 May 1996 10:19:13 +0000 () > Subject: atapi-cdrom as master > > Last week I got my atapi-cdrom-drive and had some problems with > my FreesBSD-2.1R . > The kernel detected the drive only as slave on the IDE-port. > Unfortunately with this configuration (disk master, cdrom slave) > the disk transfer slows down by a factor of 2. > > So I had a look into the source of wd.c and voila, a few changes to > wd.c made the cdrom-drive working on the second IDE-port as master drive ! > > Here is the patchfile (hopefully not only working for me) : > > - ---------- cut here and copy to wd.c.patch ----------------------------- > *** wd.c.ori Fri May 3 08:16:31 1996 > - --- wd.c Fri May 3 08:44:31 1996 > *************** > *** 480,500 **** > } else { > free(du, M_TEMP); > wddrives[lunit] = NULL; > ! } > ! } > #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) > ! goto next; > atapi_attach (dvp->id_unit, unit, dvp->id_iobase, > &kdc_wdc[dvp->id_unit]); > - - next: } > #endif > /* > * Discard any interrupts generated by wdgetctlr(). wdflushirq() > * doesn't work now because the ambient ipl is too high. > - --- 480,496 ---- > } else { > free(du, M_TEMP); > wddrives[lunit] = NULL; > ! > ! /* included werner@btp1da.phy.uni-bayreuth.de (29.4.1996) */ > #ifdef ATAPI > ! /* no disk !, search for ATAPI drive */ > atapi_attach (dvp->id_unit, unit, dvp->id_iobase, > &kdc_wdc[dvp->id_unit]); > #endif > + > + } > + } > + > /* > * Discard any interrupts generated by wdgetctlr(). wdflushirq() > * doesn't work now because the ambient ipl is too high. > - ----- then do a "patch < wd.c.patch" and recompile the kernel ----------- > > This should also work in STABLE (the wd.c is the same as in Release) > > Werner > > ------------------------------ > > End of questions-digest V1 #805 > *******************************