1 |
199 |
simons |
README FOR LINUX SONY CDU-535/531 DRIVER
|
2 |
|
|
========================================
|
3 |
|
|
|
4 |
|
|
This is the Sony CDU-535 (and 531) driver version 0.7 for Linux.
|
5 |
|
|
I do not think I have the documentation to add features like DMA support
|
6 |
|
|
so if anyone else wants to pursue it or help me with it, please do.
|
7 |
|
|
(I need to see what was done for the CDU-31A driver -- perhaps I can
|
8 |
|
|
steal some of that code.)
|
9 |
|
|
|
10 |
|
|
This is a Linux device driver for the Sony CDU-535 CDROM drive. This is
|
11 |
|
|
one of the older Sony drives with its own interface card (Sony bus).
|
12 |
|
|
The DOS driver for this drive is named SONY_CDU.SYS - when you boot DOS
|
13 |
|
|
your drive should be identified as a SONY CDU-535. The driver works
|
14 |
|
|
with a CDU-531 also. One user reported that the driver worked on drives
|
15 |
|
|
OEM'ed by Procomm, drive and interface board were labelled Procomm.
|
16 |
|
|
|
17 |
|
|
The Linux driver is based on Corey Minyard's sonycd 0.3 driver for
|
18 |
|
|
the CDU-31A. Ron Jeppesen just changed the commands that were sent
|
19 |
|
|
to the drive to correspond to the CDU-535 commands and registers.
|
20 |
|
|
There were enough changes to let bugs creep in but it seems to be stable.
|
21 |
|
|
Ron was able to tar an entire CDROM (should read all blocks) and built
|
22 |
|
|
ghostview and xfig off Walnut Creek's X11R5/GNU CDROM. xcdplayer and
|
23 |
|
|
workman work with the driver. Others have used the driver without
|
24 |
|
|
problems except those dealing with wait loops (fixed in third release).
|
25 |
|
|
Like Minyard's original driver this one uses a polled interface (this
|
26 |
|
|
is also the default setup for the DOS driver). It has not been tried
|
27 |
|
|
with interrupts or DMA enabled on the board.
|
28 |
|
|
|
29 |
|
|
REQUIREMENTS
|
30 |
|
|
============
|
31 |
|
|
|
32 |
|
|
- Sony CDU-535 drive, preferably without interrupts and DMA
|
33 |
|
|
enabled on the card.
|
34 |
|
|
|
35 |
|
|
- Drive must be set up as unit 1. Only the first unit will be
|
36 |
|
|
recognized
|
37 |
|
|
|
38 |
|
|
- you must enter your interface address into
|
39 |
|
|
/usr/src/linux/include/linux/sonycd535.h and build the
|
40 |
|
|
appropriate kernel or use the "kernel command line" parameter
|
41 |
|
|
sonycd535=0x320
|
42 |
|
|
with the correct interface address.
|
43 |
|
|
|
44 |
|
|
NOTES:
|
45 |
|
|
======
|
46 |
|
|
|
47 |
|
|
1) The drive MUST be turned on when booting or it will not be recognized!
|
48 |
|
|
(but see comments on modularized version below)
|
49 |
|
|
|
50 |
|
|
2) when the cdrom device is opened the eject button is disabled to keep the
|
51 |
|
|
user from ejecting a mounted disk and replacing it with another.
|
52 |
|
|
Unfortunately xcdplayer and workman also open the cdrom device so you
|
53 |
|
|
have to use the eject button in the software. Keep this in mind if your
|
54 |
|
|
cdrom player refuses to give up its disk -- exit workman or xcdplayer, or
|
55 |
|
|
umount the drive if it has been mounted.
|
56 |
|
|
|
57 |
|
|
THANKS
|
58 |
|
|
======
|
59 |
|
|
|
60 |
|
|
Many thanks to Ron Jeppesen (ronj.an@site007.saic.com) for getting
|
61 |
|
|
this project off the ground. He wrote the initial release
|
62 |
|
|
and the first two patches to this driver (0.1, 0.2, and 0.3).
|
63 |
|
|
Thanks also to Eberhard Moenkeberg (emoenke@gwdg.de) for prodding
|
64 |
|
|
me to place this code into the mainstream Linux source tree
|
65 |
|
|
(as of Linux version 1.1.91), as well as some patches to make
|
66 |
|
|
it a better device citizen. Further thanks to "S. Joel Katz"
|
67 |
|
|
for his MODULE patches (see details below),
|
68 |
|
|
Porfiri Claudio for patches
|
69 |
|
|
to make the driver work with the older CDU-510/515 series, and
|
70 |
|
|
Heiko Eissfeldt for pointing out that
|
71 |
|
|
the verify_area() checks were ignoring the results of said checks.
|
72 |
|
|
|
73 |
|
|
(Acknowledgments from Ron Jeppesen in the 0.3 release:)
|
74 |
|
|
Thanks to Corey Minyard who wrote the original CDU-31A driver on which
|
75 |
|
|
this driver is based. Thanks to Ken Pizzini and Bob Blair who provided
|
76 |
|
|
patches and feedback on the first release of this driver.
|
77 |
|
|
|
78 |
|
|
Ken Pizzini
|
79 |
|
|
ken@halcyon.com
|
80 |
|
|
|
81 |
|
|
------------------------------------------------------------------------------
|
82 |
|
|
(The following is from Joel Katz .)
|
83 |
|
|
|
84 |
|
|
To build a version of sony535.o that can be installed as a module,
|
85 |
|
|
use the following command:
|
86 |
|
|
|
87 |
|
|
gcc -c -D__KERNEL__ -DMODULE -O2 sonycd535.c -o sonycd535.o
|
88 |
|
|
|
89 |
|
|
To install the module, simply type:
|
90 |
|
|
|
91 |
|
|
insmod sony535.o
|
92 |
|
|
or
|
93 |
|
|
insmod sony535.o sonycd535=
|
94 |
|
|
|
95 |
|
|
And to remove it:
|
96 |
|
|
|
97 |
|
|
rmmod sony535
|
98 |
|
|
|
99 |
|
|
The code checks to see if MODULE is defined and behaves as it used
|
100 |
|
|
to if MODULE is not defined. That means your patched file should behave
|
101 |
|
|
exactly as it used to if compiled into the kernel.
|
102 |
|
|
|
103 |
|
|
I have an external drive, and I usually leave it powered off. I used
|
104 |
|
|
to have to reboot if I needed to use the CDROM drive. Now I don't.
|
105 |
|
|
|
106 |
|
|
Even if you have an internal drive, why waste the 268K of memory
|
107 |
|
|
(unswappable) that the driver uses if you use your CD-ROM drive infrequently?
|
108 |
|
|
|
109 |
|
|
This driver will not install (whether compiled in or loaded as a
|
110 |
|
|
module) if the CDROM drive is not available during its initialization. This
|
111 |
|
|
means that you can have the driver compiled into the kernel and still load
|
112 |
|
|
the module later (assuming the driver doesn't install itself during
|
113 |
|
|
power-on). This only wastes 12K when you boot with the CDROM drive off.
|
114 |
|
|
|
115 |
|
|
This is what I usually do; I leave the driver compiled into the
|
116 |
|
|
kernel, but load it as a module if I powered the system up with the drive
|
117 |
|
|
off and then later decided to use the CDROM drive.
|
118 |
|
|
|
119 |
|
|
Since the driver only uses a single page to point to the chunks,
|
120 |
|
|
attempting to set the buffer cache to more than 2 Megabytes would be very
|
121 |
|
|
bad; don't do that.
|