Initial import from FreeBSD RELENG_4:
[games.git] / share / man / man4 / atapicam.4
1 .\" Copyright (c) 2002
2 .\"     Thomas Quinot <thomas@FreeBSD.org>. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the author nor the names of any co-contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"   without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD
20 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26 .\" THE POSSIBILITY OF SUCH DAMAGE.
27 .\"
28 .\"     $FreeBSD: src/share/man/man4/atapicam.4,v 1.2.2.2 2003/03/03 18:51:16 trhodes Exp $
29 .\"
30 .Dd October 23, 2002
31 .Dt ATAPICAM 4
32 .Os
33 .Sh NAME
34 .Nm atapicam
35 .Nd CAM XPT (transport) module for ATAPI devices
36 .Sh SYNOPSIS
37 .Cd "device atapicam"
38 .Sh DESCRIPTION
39 The ATAPI/CAM module allows ATAPI devices (CD-ROM, CD-RW, DVD drives,
40 floppy drives such as Iomega Zip, tape drives) to be accessed through
41 the SCSI subsystem,
42 .Xr cam 4 .
43 .Pp
44 .Xr ata 4
45 and
46 .Xr scbus 4
47 must be configured in the kernel as well.
48 The SCSI target drivers
49 .Xr ( cd 4 ,
50 .Xr da 4 ,
51 or
52 .Xr st 4 )
53 can then be used to access the devices.
54 The generic passthrough device,
55 .Xr pass 4 ,
56 can also be used to send SCSI commands directly
57 to the devices through the CAM API.
58 .Pp
59 A separate CAM bus is created for each ATA bus in the system.
60 On each of these buses, target ID 0 is assigned to the master
61 device, and ID 1 is assigned to the slave
62 (provided they are ATAPI devices).
63 .Sh IMPLEMENTATION NOTES
64 Some SCSI commands are intercepted by the driver, and undergo special
65 processing in order to work around limitations of ATAPI devices.
66 Such limitations can be consequences of the ATAPI specification.
67 For example, ATAPI devices do not implement the 6-byte versions
68 of
69 .Dv MODE_SELECT , MODE_SENSE , READ ,
70 or
71 .Dv WRITE .
72 They can also be common bugs, such as hanging when queried for
73 extended
74 .Dv INQUIRY
75 information.
76 .Sh EXAMPLES
77 .Bd -literal -offset indent
78 device atapicam
79 device scbus
80 device cd
81 device pass
82 .Ed
83 .Pp
84 Add the
85 .Nm
86 driver to the kernel.
87 .Pp
88 .Dl "camcontrol devlist"
89 .Pp
90 Print the list of all devices available through CAM.
91 .Pp
92 .Dl "mount -t cd9660 /dev/cd0c /mnt"
93 .Pp
94 Mount a CD-ROM from an ATAPI CD-ROM drive
95 (the command above assumes that the ATAPI drive is the only CD-ROM unit).
96 .Sh SEE ALSO
97 .Xr ata 4 ,
98 .Xr cam 4 ,
99 .Xr scsi 4 ,
100 .Xr atacontrol 8 ,
101 .Xr camcontrol 8
102 .Sh HISTORY
103 The ATAPI/CAM driver first appeared in
104 .Fx 4.8
105 and
106 .Fx 5.0 .
107 .Sh AUTHORS
108 The ATAPI/CAM driver was written by
109 .An Thomas Quinot Aq thomas@FreeBSD.org .
110 .Sh BUGS
111 .Nm
112 and ATAPI-specific target drivers
113 .Xr ( acd 4 ,
114 .Xr ast 4 ,
115 and
116 .Xr afd 4 )
117 can be configured in the same kernel.
118 Simultaneous access to the same device through the SCSI generic drivers
119 and the ATAPI-specific drivers may cause problems and is strongly discouraged.