Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  4 Jul 95 01:02:48 +0400
From:      vak@cronyx.ru
To:        davidg@root.com
Cc:        hackers@freebsd.org
Subject:   Beta version of IDE CD-ROM driver ready
Message-ID:  <AAuh5-luv0@crox.net.kiae.su>
References:  <199506282043.NAA10268@gndrsh.aac.dev.com>

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

I finished the beta version of ATAPI (IDE) CD-ROM driver,
and would commit it.

Rod said you could help me.

I put it to ftp.cdrom.com:/FreeBSD/incoming/wcd10.tgz.
Would you please look at it and commit?
I am ready to make any needed changes needed.

I have also the rewritten version /usr/sbin/cdplay utility,
which is called cdcontrol.  I think we could replace the old cdplay
by new version which has much better command interface.

Regards, Serge

>   > I'm now working on the driver for ATAPI IDE CD-ROMs,
>   > and I need a major driver numbers for it.
>   >
>   > Who should I ask for?  Jordan?  Rod?
>
>   Or David or anyone else who could commit to the kernel sources....
>   Probably best beat is David, as it should probably be pulled to the
>   2.1 branch for simpler drop in of your driver for folks who will install
>   2.1 and want to add this support.
>
>   I am not saying to add the driver to 2.1, just the major dev entry
>   and /dev/MAKEDEV script.
>
>   You could greatly speed the process by providing a context diff to
>   both locations.
>
>   > Thanks in advance,
>   > Serge
>   >
>   > P.S. For those who are interested: the driver is already
>   > functioning, at least I can mount disks and read data.
>   > After adding all needed ioctls and testing the proper
>   > handling of disc change, I will commit it.
>
>   Sounds good!!!
>
>   --
>   Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
>   Accurate Automation Company                 Reliable computers for FreeBSD
>
>

Here is the README from the package.
---------------------------------------------------------------------
This is the driver of ATAPI IDE CD-ROMs for FreeBSD.

The driver was tested on Toshiba XM-5302TA drive.
All works OK, it happily coexists with the hard disk on the same drive.

The driver is based mainly on the information from Linux ide-cd driver.
Unfortunately, I have no ATAPI specifications, so I am still not sure
that everything is done correctly.

The driver consists of two parts: ATAPI level and CD-ROM subdriver.
The ATAPI level is implemented as a machine-dependent layer
between the device driver and the IDE controller.
All the machine- and controller dependency is isolated inside
the ATAPI level, while all the device dependency is located
in the device subdriver.

It seems that an ATAPI bus will became popular for medium-speed
storage devices such as CD-ROMs, magneto-optical disks, tape streamers etc.

To ease the development of new ATAPI drivers, the subdriver
interface was designed to be as simple as possible.

If you are going to make new ATAPI driver, read a brief guide
at the beginning of atapi.c.

The driver sources consist of tho C files, one include file
and a set of patches to kernel sources.  The pathes were prepared
for the SNAP-950322 version of FreeBSD, but they could be used
for any other version with small modification (probably, different
major numbers in MAKEDEV and conf.c).

How to install:

1) Put wcd.c, atapi.c and atapi.h into /sys/i386/isa directory.

2) Apply wd.c.pch to /sys/i386/isa/wd.c.

3) Apply conf.c.pch to /sys/i386/i386/conf.c.  It probably will
   need some manual work to do.  It would need different major device
   numbers; don't forget to change MAKEDEV then.

4) Apply files.i386.pch to /sys/i386/conf/files.i386.

5) Add the following lines to your kernel configuration file:

        options ATAPI   # Enable ATAPI support for IDE bus
        device  wcd0    # IDE CD-ROM driver - requires wdc and ATAPI option

  See kernel.cfg as an example.

6) Files GENERIC.pch and LINT.pch contain patches for /sys/i386/conf/GENERIC
   and /sys/i386/conf/LINT configuration files.

7) Apply MAKEDEV.pch to /dev/MAKEDEV.  Don't forget to change major
   numbers if needed.

8) Create device files:

        cd /dev
        sh MAKEDEV wcd0

9) Reconfigure, compile and install the kernel, then reboot.

The cdcontrol directory contains the sources of the cdcontrol utility,
former /usr/sbin/cdplay.  It was mostly rewritten to have more
friendly command structure, command line interface etc.

Recompile it and try:

        cdcontrol -f /dev/rcd0c info

Regards,
Serge Vakulenko,
vak@cronyx.ru



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