xref: /freebsd/share/man/man9/cd.9 (revision 22219d8b07ee616763ab4224b761a4d365af6996)
13cf493c6SJoerg Wunsch.\" Copyright (c) 1997
23cf493c6SJoerg Wunsch.\"	John-Mark Gurney.  All rights reserved.
33cf493c6SJoerg Wunsch.\"
43cf493c6SJoerg Wunsch.\" Redistribution and use in source and binary forms, with or without
53cf493c6SJoerg Wunsch.\" modification, are permitted provided that the following conditions
63cf493c6SJoerg Wunsch.\" are met:
73cf493c6SJoerg Wunsch.\" 1. Redistributions of source code must retain the above copyright
83cf493c6SJoerg Wunsch.\"    notice, this list of conditions and the following disclaimer.
93cf493c6SJoerg Wunsch.\" 2. Redistributions in binary form must reproduce the above copyright
103cf493c6SJoerg Wunsch.\"    notice, this list of conditions and the following disclaimer in the
113cf493c6SJoerg Wunsch.\"    documentation and/or other materials provided with the distribution.
123cf493c6SJoerg Wunsch.\"
133cf493c6SJoerg Wunsch.\" THIS SOFTWARE IS PROVIDED BY John-Mark Gurney AND CONTRIBUTORS ``AS IS'' AND
143cf493c6SJoerg Wunsch.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
153cf493c6SJoerg Wunsch.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
163cf493c6SJoerg Wunsch.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
173cf493c6SJoerg Wunsch.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
183cf493c6SJoerg Wunsch.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
193cf493c6SJoerg Wunsch.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
203cf493c6SJoerg Wunsch.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
213cf493c6SJoerg Wunsch.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
223cf493c6SJoerg Wunsch.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
233cf493c6SJoerg Wunsch.\" SUCH DAMAGE.
243cf493c6SJoerg Wunsch.\"
257f3dea24SPeter Wemm.\" $FreeBSD$
263cf493c6SJoerg Wunsch.\"
27*22219d8bSJohn-Mark Gurney.Dd March 25, 2014
2809edd56aSMike Pritchard.Dt CD 9
293d45e180SRuslan Ermilov.Os
303cf493c6SJoerg Wunsch.Sh NAME
313cf493c6SJoerg Wunsch.Nm cd
32e6c744a0SKenneth D. Merry.Nd CDROM driver for the CAM SCSI subsystem
333cf493c6SJoerg Wunsch.Sh DESCRIPTION
34076dc43cSMike PritchardThe
35076dc43cSMike Pritchard.Nm
3694ba280cSRuslan Ermilovdevice driver provides a read only interface for CDROM drives
3794ba280cSRuslan Ermilov.Tn ( SCSI
38e6c744a0SKenneth D. Merrytype 5)
3994ba280cSRuslan Ermilovand WORM drives
4094ba280cSRuslan Ermilov.Tn ( SCSI
41e6c744a0SKenneth D. Merrytype 4)
42e6c744a0SKenneth D. Merrythat support CDROM type commands.
43bf7f20c2SRuslan ErmilovSome drives do not behave as the driver expects.
44b02f4e90SHiten PandyaSee the
45b02f4e90SHiten Pandya.Sx QUIRKS
46b02f4e90SHiten Pandyasection for information on possible flags.
473cf493c6SJoerg Wunsch.Sh QUIRKS
483cf493c6SJoerg WunschEach
493cf493c6SJoerg Wunsch.Tn CD-ROM
503cf493c6SJoerg Wunschdevice can have different interpretations of the
513cf493c6SJoerg Wunsch.Tn SCSI
52559eb8d2SHiten Pandyaspec.
53559eb8d2SHiten PandyaThis can lead to drives requiring special handling in the driver.
54559eb8d2SHiten PandyaThe following is a list of quirks that the driver recognize.
553cf493c6SJoerg Wunsch.Bl -tag -width CD_Q_BCD_TRACKS
563cf493c6SJoerg Wunsch.It Dv CD_Q_NO_TOUCH
57b21a8885SJens SchweikhardtThis flag tells the driver not to probe the drive at attach time to see if
58559eb8d2SHiten Pandyathere is a disk in the drive and find out what size it is.
59559eb8d2SHiten PandyaThis flag is currently unimplemented in the CAM
604b66483fSRuslan Ermilov.Nm
61e6c744a0SKenneth D. Merrydriver.
623cf493c6SJoerg Wunsch.It Dv CD_Q_BCD_TRACKS
633cf493c6SJoerg WunschThis flag is for broken drives that return the track numbers in packed BCD
64559eb8d2SHiten Pandyainstead of straight decimal.
65559eb8d2SHiten PandyaIf the drive seems to skip tracks
66c4d9468eSRuslan Ermilov(tracks 10-15 are skipped)
673cf493c6SJoerg Wunschthen you have a drive that is in need of this flag.
68e6c744a0SKenneth D. Merry.It Dv CD_Q_NO_CHANGER
69e6c744a0SKenneth D. MerryThis flag tells the driver that the device in question is not a changer.
70e6c744a0SKenneth D. MerryThis is only necessary for a CDROM device with multiple luns that are not a
71e6c744a0SKenneth D. Merrypart of a changer.
72e6c744a0SKenneth D. Merry.It Dv CD_Q_CHANGER
73e6c744a0SKenneth D. MerryThis flag tells the driver that the given device is a multi-lun changer.
74e6c744a0SKenneth D. MerryIn general, the driver will figure this out automatically when it sees a
75559eb8d2SHiten PandyaLUN greater than 0.
76559eb8d2SHiten PandyaSetting this flag only has the effect of telling the
77e6c744a0SKenneth D. Merrydriver to run the initial read capacity command for LUN 0 of the changer
78e6c744a0SKenneth D. Merrythrough the changer scheduling code.
79cb32189eSKenneth D. Merry.It Dv CD_Q_10_BYTE_ONLY
80cb32189eSKenneth D. MerryThis flag tells the driver that the given device only accepts 10 byte MODE
81559eb8d2SHiten PandyaSENSE/MODE SELECT commands.
82559eb8d2SHiten PandyaIn general these types of quirks should not be
83cb32189eSKenneth D. Merryadded to the
84cb32189eSKenneth D. Merry.Xr cd 4
85559eb8d2SHiten Pandyadriver.
86559eb8d2SHiten PandyaThe reason is that the driver does several things to attempt to
87559eb8d2SHiten Pandyadetermine whether the drive in question needs 10 byte commands.
88559eb8d2SHiten PandyaFirst, it
89cb32189eSKenneth D. Merryissues a CAM Path Inquiry command to determine whether the protocol that
90d5a8819cSHiten Pandyathe drive speaks typically only allows 10 byte commands.
91bf7f20c2SRuslan Ermilov(ATAPI and USB
92cb32189eSKenneth D. Merryare two prominent examples of protocols where you generally only want to
93bf7f20c2SRuslan Ermilovsend 10 byte commands.)
94d5a8819cSHiten PandyaThen, if it gets an ILLEGAL REQUEST error back
95cb32189eSKenneth D. Merryfrom a 6 byte MODE SENSE or MODE SELECT command, it attempts to send the 10
96559eb8d2SHiten Pandyabyte version of the command instead.
97559eb8d2SHiten PandyaThe only reason you would need a
98bf7f20c2SRuslan Ermilovquirk is if your drive uses a protocol (e.g.,
99cb32189eSKenneth D. Merry.Tn SCSI )
1000227791bSRuslan Ermilovthat typically does not have a problem with 6 byte commands.
1013cf493c6SJoerg Wunsch.El
1023cf493c6SJoerg Wunsch.Sh FILES
103e6c744a0SKenneth D. Merry.Bl -tag -width /sys/cam/scsi/scsi_cd.c -compact
104e6c744a0SKenneth D. Merry.It Pa /sys/cam/scsi/scsi_cd.c
105e6c744a0SKenneth D. Merryis the driver source file.
1063cf493c6SJoerg Wunsch.El
1073cf493c6SJoerg Wunsch.Sh SEE ALSO
1083cf493c6SJoerg Wunsch.Xr cd 4 ,
109de336449SKenneth D. Merry.Xr scsi 4
1103cf493c6SJoerg Wunsch.Sh HISTORY
1113cf493c6SJoerg WunschThe
1123cf493c6SJoerg Wunsch.Nm
1133cf493c6SJoerg Wunschmanual page first appeared in
1140f63118aSMike Pritchard.Fx 2.2 .
115aaf1f16eSPhilippe Charnier.Sh AUTHORS
116f4d874a1SRuslan Ermilov.An -nosplit
1173cf493c6SJoerg WunschThis
118aaf1f16eSPhilippe Charniermanual page was written by
119*22219d8bSJohn-Mark Gurney.An John-Mark Gurney Aq jmg@FreeBSD.org .
120e6c744a0SKenneth D. MerryIt was updated for CAM and
121e6c744a0SKenneth D. Merry.Fx 3.0
122e6c744a0SKenneth D. Merryby
123def37e7cSMike Pritchard.An Kenneth Merry Aq ken@FreeBSD.org .
124