]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man9/cd.9
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man9 / cd.9
1 .\" Copyright (c) 1997
2 .\"     John-Mark Gurney.  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 John-Mark Gurney 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 CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\" $FreeBSD$
29 .\"
30 .Dd September 2, 2003
31 .Dt CD 9
32 .Os
33 .Sh NAME
34 .Nm cd
35 .Nd CDROM driver for the CAM SCSI subsystem
36 .Sh DESCRIPTION
37 The
38 .Nm
39 device driver provides a read only interface for CDROM drives
40 .Tn ( SCSI
41 type 5)
42 and WORM drives
43 .Tn ( SCSI
44 type 4)
45 that support CDROM type commands.
46 Some drives do not behave as the driver expects.
47 See the
48 .Sx QUIRKS
49 section for information on possible flags.
50 .Sh QUIRKS
51 Each
52 .Tn CD-ROM
53 device can have different interpretations of the
54 .Tn SCSI
55 spec.
56 This can lead to drives requiring special handling in the driver.
57 The following is a list of quirks that the driver recognize.
58 .Bl -tag -width CD_Q_BCD_TRACKS
59 .It Dv CD_Q_NO_TOUCH
60 This flag tells the driver not to probe the drive at attach time to see if
61 there is a disk in the drive and find out what size it is.
62 This flag is currently unimplemented in the CAM
63 .Nm
64 driver.
65 .It Dv CD_Q_BCD_TRACKS
66 This flag is for broken drives that return the track numbers in packed BCD
67 instead of straight decimal.
68 If the drive seems to skip tracks
69 (tracks 10-15 are skipped)
70 then you have a drive that is in need of this flag.
71 .It Dv CD_Q_NO_CHANGER
72 This flag tells the driver that the device in question is not a changer.
73 This is only necessary for a CDROM device with multiple luns that are not a
74 part of a changer.
75 .It Dv CD_Q_CHANGER
76 This flag tells the driver that the given device is a multi-lun changer.
77 In general, the driver will figure this out automatically when it sees a
78 LUN greater than 0.
79 Setting this flag only has the effect of telling the
80 driver to run the initial read capacity command for LUN 0 of the changer
81 through the changer scheduling code.
82 .It Dv CD_Q_10_BYTE_ONLY
83 This flag tells the driver that the given device only accepts 10 byte MODE
84 SENSE/MODE SELECT commands.
85 In general these types of quirks should not be
86 added to the
87 .Xr cd 4
88 driver.
89 The reason is that the driver does several things to attempt to
90 determine whether the drive in question needs 10 byte commands.
91 First, it
92 issues a CAM Path Inquiry command to determine whether the protocol that
93 the drive speaks typically only allows 10 byte commands.
94 (ATAPI and USB
95 are two prominent examples of protocols where you generally only want to
96 send 10 byte commands.)
97 Then, if it gets an ILLEGAL REQUEST error back
98 from a 6 byte MODE SENSE or MODE SELECT command, it attempts to send the 10
99 byte version of the command instead.
100 The only reason you would need a
101 quirk is if your drive uses a protocol (e.g.,
102 .Tn SCSI )
103 that typically does not have a problem with 6 byte commands.
104 .El
105 .Sh FILES
106 .Bl -tag -width /sys/cam/scsi/scsi_cd.c -compact
107 .It Pa /sys/cam/scsi/scsi_cd.c
108 is the driver source file.
109 .El
110 .Sh SEE ALSO
111 .Xr cd 4 ,
112 .Xr scsi 4
113 .Sh HISTORY
114 The
115 .Nm
116 manual page first appeared in
117 .Fx 2.2 .
118 .Sh AUTHORS
119 .An -nosplit
120 This
121 manual page was written by
122 .An John-Mark Gurney Aq gurney_j@efn.org .
123 It was updated for CAM and
124 .Fx 3.0
125 by
126 .An Kenneth Merry Aq ken@FreeBSD.org .