summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/cfumass.4 3.html
blob: a846b4ce88a14742634d3c6c5110b5e2096b5ebb (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
96
97
98
99
100
101
102
103
104
105
<table class="head">
  <tr>
    <td class="head-ltitle">CFUMASS(4)</td>
    <td class="head-vol">Device Drivers Manual</td>
    <td class="head-rtitle">CFUMASS(4)</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">cfumass</code> &#x2014; <span class="Nd">USB
    device side support for Mass Storage Class Transport</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp">This driver can be compiled into the kernel by placing these lines
    in the kernel configuration file:</p>
<div class="Bd Pp Bd-indent"><code class="Cd">device usb</code>
<br/>
<code class="Cd">device usb_template</code>
<br/>
<code class="Cd">device ctl</code>
<br/>
<code class="Cd">device cfumass</code></div>
<p class="Pp">The driver module can also be loaded at boot by adding this line
    to <a class="Xr">loader.conf(5)</a>:</p>
<div class="Bd Pp Bd-indent Li">
<pre>cfumass_load=&quot;YES&quot;</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The <code class="Nm">cfumass</code> driver provides device side
    support for emulating an USB mass storage device compliant with the USB Mass
    Storage Class Bulk-Only (BBB) Transport specification, implemented as a
    <a class="Xr">ctl(4)</a> frontend driver.</p>
<p class="Pp">To use <code class="Nm">cfumass</code>:</p>
<ul class="Bl-bullet">
  <li><code class="Nm">cfumass</code> must be loaded as a module or compiled
      into the kernel.</li>
  <li>The USB Mass Storage template must be chosen by setting the
      <var class="Va">hw.usb.template</var> sysctl to 0.</li>
  <li>The USB OTG port must be working in USB device-side mode. This happens
      automatically upon connection to a USB host.</li>
  <li>There must be a <a class="Xr">ctl(4)</a> LUN configured for the
      <span class="Pa">cfumass</span> port.</li>
</ul>
<p class="Pp">Upon loading, the driver creates a <a class="Xr">ctl(4)</a> port
    named <span class="Pa">cfumass</span>, presenting the first LUN mapped for
    that port - usually LUN 0 - to the USB host. See
    <a class="Xr">ctl.conf(5)</a> and <a class="Xr">ctld(8)</a> for details on
    configuring the LUN. See the <code class="Cm">cfumass_enable</code> and
    <code class="Cm">cfumass_dir</code> <a class="Xr">rc(8)</a> variables in
    <a class="Xr">rc.conf(5)</a> for an automated way to configure it at
  boot.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYSCTL_VARIABLES"><a class="permalink" href="#SYSCTL_VARIABLES">SYSCTL
  VARIABLES</a></h1>
<p class="Pp">These variables are available as both <a class="Xr">sysctl(8)</a>
    variables and <a class="Xr">loader(8)</a> tunables:</p>
<dl class="Bl-tag">
  <dt id="hw.usb.cfumass.debug"><var class="Va">hw.usb.cfumass.debug</var></dt>
  <dd>Verbosity level for log messages from the <code class="Nm">cfumass</code>
      driver. Set to 0 to disable logging or 1 to warn about potential problems.
      Larger values enable debugging output. Defaults to 1.</dd>
  <dt id="hw.usb.cfumass.ignore_stop"><var class="Va">hw.usb.cfumass.ignore_stop</var></dt>
  <dd>Ignore START STOP UNIT SCSI commands with START and LOEJ bits cleared.
      Some initiators send that command to stop the target when the user
      attempts to gracefully eject the drive, but fail to start it when the
      drive is reconnected. Set to 0 to handle the command in a
      standards-compliant way, 1 to ignore it and log a warning, or 2 to ignore
      it silently. Defaults to 1.</dd>
  <dt id="hw.usb.cfumass.max_lun"><var class="Va">hw.usb.cfumass.max_lun</var></dt>
  <dd>Max LUN number to report to the initiator (USB host). Must be between 0
      and 15. Some initiators incorrectly handle values larger than 0. Defaults
      to 0.</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">ctl(4)</a>, <a class="Xr">umass(4)</a>,
    <a class="Xr">usb(4)</a>, <a class="Xr">usb_template(4)</a>,
    <a class="Xr">ctl.conf(5)</a>, <a class="Xr">ctld(8)</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">cfumass</code> driver first appeared in
    <span class="Ux">FreeBSD 11.1</span>.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">The <code class="Nm">cfumass</code> driver was developed by
    <span class="An">Edward Tomasz Napierala</span>
    &lt;<a class="Mt" href="mailto:trasz@FreeBSD.org">trasz@FreeBSD.org</a>&gt;
    under sponsorship from the FreeBSD Foundation.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">April 21, 2018</td>
    <td class="foot-os">FreeBSD 15.0</td>
  </tr>
</table>