summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/cd.9 3.html
blob: 344017b2f2004e6114be922e0b2df82468f17e34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<table class="head">
  <tr>
    <td class="head-ltitle">CD(9)</td>
    <td class="head-vol">Kernel Developer's Manual</td>
    <td class="head-rtitle">CD(9)</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">cd</code> &#x2014; <span class="Nd">CDROM driver
    for the CAM SCSI subsystem</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">cd</code> device driver provides a read-only
    interface for CDROM drives (SCSI type 5) and WORM drives (SCSI type 4) that
    support CDROM type commands. Some drives do not behave as the driver
    expects. See the <a class="Sx" href="#QUIRKS">QUIRKS</a> section for
    information on possible flags.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="QUIRKS"><a class="permalink" href="#QUIRKS">QUIRKS</a></h1>
<p class="Pp">Each CD-ROM device can have different interpretations of the SCSI
    spec. This can lead to drives requiring special handling in the driver. The
    following is a list of quirks that the driver recognizes.</p>
<dl class="Bl-tag">
  <dt id="CD_Q_NO_TOUCH"><a class="permalink" href="#CD_Q_NO_TOUCH"><code class="Dv">CD_Q_NO_TOUCH</code></a></dt>
  <dd>This flag tells the driver not to probe the drive at attach time to see if
      there is a disk in the drive and find out what size it is. This flag is
      currently unimplemented in the CAM <code class="Nm">cd</code> driver.</dd>
  <dt id="CD_Q_BCD_TRACKS"><a class="permalink" href="#CD_Q_BCD_TRACKS"><code class="Dv">CD_Q_BCD_TRACKS</code></a></dt>
  <dd>This flag is for broken drives that return the track numbers in packed BCD
      instead of straight decimal. If the drive seems to skip tracks (tracks
      10-15 are skipped) then you have a drive that is in need of this
    flag.</dd>
  <dt id="CD_Q_NO_CHANGER"><a class="permalink" href="#CD_Q_NO_CHANGER"><code class="Dv">CD_Q_NO_CHANGER</code></a></dt>
  <dd>This flag tells the driver that the device in question is not a changer.
      This is only necessary for a CDROM device with multiple luns that are not
      a part of a changer.</dd>
  <dt id="CD_Q_CHANGER"><a class="permalink" href="#CD_Q_CHANGER"><code class="Dv">CD_Q_CHANGER</code></a></dt>
  <dd>This flag tells the driver that the given device is a multi-lun changer.
      In general, the driver will figure this out automatically when it sees a
      LUN greater than 0. Setting this flag only has the effect of telling the
      driver to run the initial read capacity command for LUN 0 of the changer
      through the changer scheduling code.</dd>
  <dt id="CD_Q_10_BYTE_ONLY"><a class="permalink" href="#CD_Q_10_BYTE_ONLY"><code class="Dv">CD_Q_10_BYTE_ONLY</code></a></dt>
  <dd>This flag tells the driver that the given device only accepts 10 byte MODE
      SENSE/MODE SELECT commands. In general these types of quirks should not be
      added to the <a class="Xr">cd(4)</a> driver. The reason is that the driver
      does several things to attempt to determine whether the drive in question
      needs 10 byte commands. First, it issues a CAM Path Inquiry command to
      determine whether the protocol that the drive speaks typically only allows
      10 byte commands. (ATAPI and USB are two prominent examples of protocols
      where you generally only want to send 10 byte commands.) Then, if it gets
      an ILLEGAL REQUEST error back from a 6 byte MODE SENSE or MODE SELECT
      command, it attempts to send the 10 byte version of the command instead.
      The only reason you would need a quirk is if your drive uses a protocol
      (e.g., SCSI) that typically does not have a problem with 6 byte
    commands.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag Bl-compact">
  <dt><span class="Pa">/sys/cam/scsi/scsi_cd.c</span></dt>
  <dd>is the driver source file.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
  ALSO</a></h1>
<p class="Pp"><a class="Xr">cd(4)</a>, <a class="Xr">scsi(4)</a></p>
</section>
<section class="Sh">
<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
<p class="Pp">The <code class="Nm">cd</code> manual page first appeared in
    <span class="Ux">FreeBSD 2.2</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page was written by <span class="An">John-Mark
    Gurney</span>
    &lt;<a class="Mt" href="mailto:jmg@FreeBSD.org">jmg@FreeBSD.org</a>&gt;. It
    was updated for CAM and <span class="Ux">FreeBSD 3.0</span> by
    <span class="An">Kenneth Merry</span>
    &lt;<a class="Mt" href="mailto:ken@FreeBSD.org">ken@FreeBSD.org</a>&gt;.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">March 25, 2014</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>