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