view Documentation/cdrom/cdu31a @ 524:7f8b544237bf

netfront: Allow netfront in domain 0.

This is useful if your physical network device is in a utility domain.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 15 15:18:58 2008 +0100 (2008-04-15)
parents 831230e53067
line source
2 CDU31A/CDU33A Driver Info
3 -------------------------
5 Information on the Sony CDU31A/CDU33A CDROM driver for the Linux
6 kernel.
8 Corey Minyard (minyard@metronet.com)
10 Colossians 3:17
12 Crude Table of Contents
13 -----------------------
15 Setting Up the Hardware
16 Configuring the Kernel
17 Configuring as a Module
18 Driver Special Features
21 This device driver handles Sony CDU31A/CDU33A CDROM drives and
22 provides a complete block-level interface as well as an ioctl()
23 interface as specified in include/linux/cdrom.h). With this
24 interface, CDROMs can be accessed, standard audio CDs can be played
25 back normally, and CD audio information can be read off the drive.
27 Note that this will only work for CDU31A/CDU33A drives. Some vendors
28 market their drives as CDU31A compatible. They lie. Their drives are
29 really CDU31A hardware interface compatible (they can plug into the
30 same card). They are not software compatible.
32 Setting Up the Hardware
33 -----------------------
35 The CDU31A driver is unable to safely tell if an interface card is
36 present that it can use because the interface card does not announce
37 its presence in any way besides placing 4 I/O locations in memory. It
38 used to just probe memory and attempt commands, but Linus wisely asked
39 me to remove that because it could really screw up other hardware in
40 the system.
42 Because of this, you must tell the kernel where the drive interface
43 is, what interrupts are used, and possibly if you are on a PAS-16
44 soundcard.
46 If you have the Sony CDU31A/CDU33A drive interface card, the following
47 diagram will help you set it up. If you have another card, you are on
48 your own. You need to make sure that the I/O address and interrupt is
49 not used by another card in the system. You will need to know the I/O
50 address and interrupt you have set. Note that use of interrupts is
51 highly recommended, if possible, it really cuts down on CPU used.
52 Unfortunately, most soundcards do not support interrupts for their
53 CDROM interfaces. By default, the Sony interface card comes with
54 interrupts disabled.
56 +----------+-----------------+----------------------+
57 | JP1 | 34 Pin Conn | |
58 | JP2 +-----------------+ |
59 | JP3 |
60 | JP4 |
61 | +--+
62 | | +-+
63 | | | | External
64 | | | | Connector
65 | | | |
66 | | +-+
67 | +--+
68 | |
69 | +--------+
70 | |
71 +------------------------------------------+
73 JP1 sets the Base Address, using the following settings:
75 Address Pin 1 Pin 2
76 ------- ----- -----
77 0x320 Short Short
78 0x330 Short Open
79 0x340 Open Short
80 0x360 Open Open
82 JP2 and JP3 configure the DMA channel; they must be set the same.
84 DMA Pin 1 Pin 2 Pin 3
85 --- ----- ----- -----
86 1 On Off On
87 2 Off On Off
88 3 Off Off On
90 JP4 Configures the IRQ:
92 IRQ Pin 1 Pin 2 Pin 3 Pin 4
93 --- ----- ----- ----- -----
94 3 Off Off On Off
95 4 Off Off* Off On
96 5 On Off Off Off
97 6 Off On Off Off
99 The documentation states to set this for interrupt
100 4, but I think that is a mistake.
102 Note that if you have another interface card, you will need to look at
103 the documentation to find the I/O base address. This is specified to
104 the SLCD.SYS driver for DOS with the /B: parameter, so you can look at
105 you DOS driver setup to find the address, if necessary.
107 Configuring the Kernel
108 ----------------------
110 You must tell the kernel where the drive is at boot time. This can be
111 done at the Linux boot prompt, by using LILO, or by using Bootlin.
112 Note that this is no substitute for HOWTOs and LILO documentation, if
113 you are confused please read those for info on bootline configuration
114 and LILO.
116 At the linux boot prompt, press the ALT key and add the following line
117 after the boot name (you can let the kernel boot, it will tell you the
118 default boot name while booting):
120 cdu31a=<base address>,<interrupt>[,PAS]
122 The base address needs to have "0x" in front of it, since it is in
123 hex. For instance, to configure a drive at address 320 on interrupt 5,
124 use the following:
126 cdu31a=0x320,5
128 I use the following boot line:
130 cdu31a=0x1f88,0,PAS
132 because I have a PAS-16 which does not support interrupt for the
133 CDU31A interface.
135 Adding this as an append line at the beginning of the /etc/lilo.conf
136 file will set it for lilo configurations. I have the following as the
137 first line in my lilo.conf file:
139 append="cdu31a=0x1f88,0"
141 I'm not sure how to set up Bootlin (I have never used it), if someone
142 would like to fill in this section please do.
145 Configuring as a Module
146 -----------------------
148 The driver supports loading as a module. However, you must specify
149 the boot address and interrupt on the boot line to insmod. You can't
150 use modprobe to load it, since modprobe doesn't support setting
151 variables.
153 Anyway, I use the following line to load my driver as a module
155 /sbin/insmod /lib/modules/`uname -r`/misc/cdu31a.o cdu31a_port=0x1f88
157 You can set the following variables in the driver:
159 cdu31a_port=<I/O address> - sets the base I/O. If hex, put 0x in
160 front of it. This must be specified.
162 cdu31a_irq=<interrupt> - Sets the interrupt number. Leaving this
163 off will turn interrupts off.
166 Driver Special Features
167 -----------------------
169 This section describes features beyond the normal audio and CD-ROM
170 functions of the drive.
172 2048 byte buffer mode
174 If a disk is mounted with -o block=2048, data is copied straight from
175 the drive data port to the buffer. Otherwise, the readahead buffer
176 must be involved to hold the other 1K of data when a 1K block
177 operation is done. Note that with 2048 byte blocks you cannot execute
178 files from the CD.
180 XA compatibility
182 The driver should support XA disks for both the CDU31A and CDU33A. It
183 does this transparently, the using program doesn't need to set it.
185 Multi-Session
187 A multi-session disk looks just like a normal disk to the user. Just
188 mount one normally, and all the data should be there. A special
189 thanks to Koen for help with this!
191 Raw sector I/O
193 Using the CDROMREADAUDIO it is possible to read raw audio and data
194 tracks. Both operations return 2352 bytes per sector. On the data
195 tracks, the first 12 bytes is not returned by the drive and the value
196 of that data is indeterminate.