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