kernel functions

David Fries (david@emcee.com)
15 Jan 1997 06:45:11 GMT


I have been writing a driver for my cdrom, it is a Funai double spin.
I am using the cdrom.o for the generic functions.
Currently, it is reading the drive fine if I do dd, or cat, or any command
like that. If I try to mount the drive it reads (in cdrom sectors, 4*normal)
it reads sector 16 to and including 99 then gives the message
Unable to identify CD-ROM format. The cdrom driver does a 150 offset.

If anyone has any idea what could cause it please e-mail. Also if you want
to see my driver. I'm using 2.0.27.

Also since I am developing the driver from watching i/o activity of the dos
driver using dosemu I need the setup/end of the transfer for debug etc.
What I currently have setup is one major registered as the block device
and another major registered as a character device. What I want to do is
as follows. cat /dev/cfunai (character) > cfile & dd if=/dev/bfunai etc. you
get the idea. The character device would return the transfer information
between the driver and cdrom (variable length and needs to be seperate from
data). The block device /dev/bfunai would return the data just as a normal
block device would. The character and block functions are in one file/driver.
The block read function fills two pointer arrays, one for data, one for
the character device.

I have everything setup except for one detail. I need the character read
function to wait untill the array it needs to output is ready and also the
size of it. I need the block read function to also wait untill the character
device has finished the last transfer and it needs to pass a variable to the
character read function that has the size of the array.
I don't know enought about the kernel function communication to do something
like this currently.

I would really rather not use printk to return the information, because it
would be a lot of data, and not limited to plain ascii character set.
Not to mention having to sort it out of the logs after wards.

If anyone has any advice, sample source etc, I would really like to hear
from you. The source code right now is almost 498 lines,11k long if anyone
wanted me to sent it.

+---------------------------------+
| David Fries |
| dfries@mail.win.org |
+---------------------------------+