From: <james@spunkysoftware.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: Creative 4-speed CDROM driver
Date: Tue, 29 May 2001 08:20:42 +0100 [thread overview]
Message-ID: <001301c0e80f$f898f0a0$c1a5fea9@spunky> (raw)
In-Reply-To: <E154UTa-0003YH-00@the-village.bc.nu>
Can you explain what this meas? Fake an SCSI device and use the SCSI driver
to drive my CDROM? But what about the I/O port regions of memory, and the
IRQ? Aren't they different?
I am new to device drivers, I don't understand what I have to do. I know
that I need to provide a service so I can mount my cdrom and use it, and
that applications can read data from the /dev/cd0/whatever.file file on
Minix.
I need to know what the I/O hex memory area is, what IRQ to use, etc. I also
need to know what functions I have to provide, like:
open(filename, mode)
read(fd, buffer, buffersize, flags) -- how to specify number of byts to
read??
In the device driver code, I need to know what commands are for the ATAPI
CDROM, or how I can do it as an SCSI like you say, like 0x30 put in I/O
address whatever might be to query to see if there is a CD in the drive etc
etc.
This is very confusing. Would I benefit from reading the standards document
you speak of? Where can I download a copy?
How do I handle asynchronous I/O with a driver for a CDROM? Do I identify
each user by the file descriptor when they issue a open() call, like in
subsequent calls to read() they will pass the file descriptor, and I would
have say a list of structures holding the file descriptor, offset where the
last read() was, and so on, if so, what fields do I put in my structures and
so on?
As you can see, I am a newbie to device driver writing. ;) I am trying to
learn by doing.
Unfortunately, I simply do not understand the code for device drivers that
hackers have written. I don't know where to start and how to make sense of
the code, to read it line by line and understand what it is doing.
I am going to take a look at the IDE CDROM driver code in Linux and see if I
can modify the code to work as a device driver for Minix.
Hope you can help me here, I'm really stuck!
:-) Thanks Alan. I see that you are a prominent Linux developer and you know
Linus. What device drivers have you written, or do you concentrate on the
kernel proper?
Cheers mate!
James
----- Original Message -----
From: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
To: <james@spunkysoftware.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Monday, May 28, 2001 10:22 PM
Subject: Re: Creative 4-speed CDROM driver
> > If anyone on the kernel list has written a driver for a CDROM please
send me
> > mail about how you went about it, did you approach the manufacturer for
the
> > documentation on the device, if I made a mistake could I ruin my
hardware?
> > and stuff like that.
>
> For IDE CD-ROM there is a standard. Its about 600 pages long but the best
> model is probably to implement scsi over atapi since Minix has some basic
scsi
> code. Then you can drive all but very old ide cdrom devices as scsi
>
>
>
next prev parent reply other threads:[~2001-05-28 22:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-29 4:22 Creative 4-speed CDROM driver james
2001-05-28 21:22 ` Alan Cox
2001-05-29 7:20 ` james [this message]
2001-05-28 22:21 ` Alan Cox
2001-05-29 7:35 ` james
2001-05-29 10:21 ` Francois Romieu
[not found] ` <015601c0e8de$0e936ba0$c1a5fea9@spunky>
[not found] ` <20010530094004.A14129@se1.cogenit.fr>
2001-05-30 17:21 ` james
2001-05-30 15:12 ` Masoud Sharbiani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001301c0e80f$f898f0a0$c1a5fea9@spunky' \
--to=james@spunkysoftware.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox