- Add polling(4) support for jme(4)
[dragonfly.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 .\"     $DragonFly: src/share/man/man4/atapicam.4,v 1.3 2008/09/06 10:36:27 thomas Exp $
30 .\"
31 .Dd October 23, 2002
32 .Dt ATAPICAM 4
33 .Os
34 .Sh NAME
35 .Nm atapicam
36 .Nd CAM XPT (transport) module for ATAPI devices
37 .Sh SYNOPSIS
38 .Cd "device atapicam"
39 .Sh DESCRIPTION
40 The ATAPI/CAM module allows ATAPI devices (CD-ROM, CD-RW, DVD drives,
41 floppy drives such as Iomega Zip, tape drives) to be accessed through
42 the SCSI subsystem,
43 .Xr cam 4 .
44 .Pp
45 .Xr nata 4
46 or
47 .Xr ata 4
48 and
49 .Xr scbus 4
50 must be configured in the kernel as well.
51 The SCSI target drivers
52 .Xr ( cd 4 ,
53 .Xr da 4 ,
54 or
55 .Xr st 4 )
56 can then be used to access the devices.
57 The generic passthrough device,
58 .Xr pass 4 ,
59 can also be used to send SCSI commands directly
60 to the devices through the CAM API.
61 .Pp
62 A separate CAM bus is created for each ATA bus in the system.
63 On each of these buses, target ID 0 is assigned to the master
64 device, and ID 1 is assigned to the slave
65 (provided they are ATAPI devices).
66 .Sh IMPLEMENTATION NOTES
67 Some SCSI commands are intercepted by the driver, and undergo special
68 processing in order to work around limitations of ATAPI devices.
69 Such limitations can be consequences of the ATAPI specification.
70 For example, ATAPI devices do not implement the 6-byte versions
71 of
72 .Dv MODE_SELECT , MODE_SENSE , READ ,
73 or
74 .Dv WRITE .
75 They can also be common bugs, such as hanging when queried for
76 extended
77 .Dv INQUIRY
78 information.
79 .Sh EXAMPLES
80 .Bd -literal -offset indent
81 device atapicam
82 device scbus
83 device cd
84 device pass
85 .Ed
86 .Pp
87 Add the
88 .Nm
89 driver to the kernel.
90 .Pp
91 .Dl "camcontrol devlist"
92 .Pp
93 Print the list of all devices available through CAM.
94 .Pp
95 .Dl "mount -t cd9660 /dev/cd0c /mnt"
96 .Pp
97 Mount a CD-ROM from an ATAPI CD-ROM drive
98 (the command above assumes that the ATAPI drive is the only CD-ROM unit).
99 .Sh SEE ALSO
100 .Xr ata 4 ,
101 .Xr cam 4 ,
102 .Xr nata 4 ,
103 .Xr scsi 4 ,
104 .Xr atacontrol 8 ,
105 .Xr camcontrol 8
106 .Xr natacontrol 8 ,
107 .Sh HISTORY
108 The ATAPI/CAM driver first appeared in
109 .Fx 4.8
110 and
111 .Fx 5.0 .
112 .Sh AUTHORS
113 The ATAPI/CAM driver was written by
114 .An Thomas Quinot Aq thomas@FreeBSD.org .
115 .Sh BUGS
116 .Nm
117 and ATAPI-specific target drivers
118 .Xr ( acd 4 ,
119 .Xr ast 4 ,
120 and
121 .Xr afd 4 )
122 can be configured in the same kernel.
123 Simultaneous access to the same device through the SCSI generic drivers
124 and the ATAPI-specific drivers may cause problems and is strongly discouraged.