summaryrefslogtreecommitdiff
path: root/static/netbsd/man4/iop.4 2.html
blob: 702b81d9a0a69901ba28b7d558fc6bfd668815db (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<table class="head">
  <tr>
    <td class="head-ltitle">IOP(4)</td>
    <td class="head-vol">Device Drivers Manual</td>
    <td class="head-rtitle">IOP(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">iop</code> &#x2014; <span class="Nd">I2O adapter
    driver</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="Cd">iop* at pci? dev ? function ?</code>
  <br/>
  <code class="Cd">iopsp* at iop? tid ?</code>
  <br/>
  <code class="Cd">ld* at iop? tid ?</code>
  <br/>
  <code class="Cd">dpti* at iop? tid 0</code></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">iop</code> driver provides support for PCI
    I/O processors conforming to the I2O specification, revision 1.5 and
  above.</p>
<p class="Pp">I2O is a specification that defines a software interface for
    communicating with a number of device types. In its basic form, I2O provides
    the following:</p>
<ul class="Bl-bullet">
  <li>A vendor-neutral interface for communicating with an I/O processor (IOP)
      and a number of types of peripherals. In order to achieve this,
      hardware-specific device drivers run on the IOP, and hardware-neutral
      device drivers run on the host.</li>
  <li>Reduced I/O overhead for the host. All communication between the host and
      the IOP is performed using a high level protocol. The specification also
      provides for batching of requests and replies between the host and
    IOP.</li>
  <li>An optional vendor-neutral configuration interface. Data from HTTP GET and
      POST operations can be channeled to individual devices, and HTML pages
      returned.</li>
</ul>
<p class="Pp">Five types of devices are well defined by the specification. These
    are:</p>
<p class="Pp"></p>
<ul class="Bl-bullet Bl-compact">
  <li>Random block storage devices (disks).</li>
  <li>Sequential storage devices (tapes).</li>
  <li>LAN interfaces, including Ethernet, FDDI, and Token Ring.</li>
  <li>Bus ports (SCSI).</li>
  <li>SCSI peripherals.</li>
</ul>
<p class="Pp">The <code class="Nm">iop</code> driver's role is to initialize and
    monitor the IOP, provide a conduit for messages and replies to and from
    devices, and provide other common services for peripheral drivers, such as
    DMA mapping.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="IOCTL_INTERFACE"><a class="permalink" href="#IOCTL_INTERFACE">IOCTL
  INTERFACE</a></h1>
<p class="Pp">The following structures and constants are defined in
    <span class="Pa">dev/i2o/iopio.h</span>. Note that the headers
    <span class="Pa">sys/types.h</span>, <span class="Pa">sys/device.h</span>
    and <span class="Pa">dev/i2o/i2o.h</span> are prerequisites and must
    therefore be included beforehand.</p>
<dl class="Bl-tag">
  <dt id="IOPIOCPT"><a class="permalink" href="#IOPIOCPT"><code class="Dv">IOPIOCPT
    (struct ioppt)</code></a></dt>
  <dd>Submit a message to the IOP and return the reply. Note that the return
      value of this ioctl is not affected by completion status as indicated by
      the reply.
    <div class="Bd Pp Li">
    <pre>struct ioppt {
	void	*pt_msg;	/* pointer to message buffer */
	size_t	pt_msglen;	/* message buffer size in bytes */
	void	*pt_reply;	/* pointer to reply buffer */
	size_t	pt_replylen;	/* reply buffer size in bytes */
	int	pt_timo;	/* completion timeout in ms */
	int	pt_nbufs;	/* number of transfers */
	struct	ioppt_buf pt_bufs[IOP_MAX_MSG_XFERS]; /* transfers */
};

struct ioppt_buf {
	void	*ptb_data;	/* pointer to buffer */
	size_t	ptb_datalen;	/* buffer size in bytes */
	int	ptb_out;	/* non-zero if transfer is to IOP */
};</pre>
    </div>
    <p class="Pp">The minimum timeout value that may be specified is 1000ms. All
        other values must not exceed the <code class="Nm">iop</code> driver's
        operational limits.</p>
    <p class="Pp">The initiator context and transaction context fields in the
        message frame will be filled by the <code class="Nm">iop</code> driver.
        As such, this ioctl may not be used to send messages without a
        transaction context payload.</p>
  </dd>
  <dt id="IOPIOCGSTATUS"><a class="permalink" href="#IOPIOCGSTATUS"><code class="Dv">IOPIOCGSTATUS
    (struct iovec)</code></a></dt>
  <dd>Request the latest available status record from the IOP. This special-case
      ioctl is provided as the I2O_EXEC_STATUS_GET message does not post
      replies, and can therefore not be safely issued using the IOPIOCPT
    ioctl.</dd>
</dl>
<p class="Pp">The following ioctls may block while attempting to acquire the
    <code class="Nm">iop</code> driver's configuration lock, and may fail if the
    acquisition times out.</p>
<dl class="Bl-tag">
  <dt id="IOPIOCGLCT"><a class="permalink" href="#IOPIOCGLCT"><code class="Dv">IOPIOCGLCT
    (struct iovec)</code></a></dt>
  <dd>Retrieve the <code class="Nm">iop</code> driver's copy of the logical
      configuration table. This copy of the LCT matches the current device
      configuration, but is not necessarily the latest available version of the
      LCT.</dd>
  <dt id="IOPIOCRECONFIG"><a class="permalink" href="#IOPIOCRECONFIG"><code class="Dv">IOPIOCRECONFIG</code></a></dt>
  <dd>Request that the <code class="Nm">iop</code> driver scan all bus ports,
      retrieve the latest version of the LCT, and attach or detach devices as
      necessary. Note that higher-level reconfiguration tasks (such as logically
      re-scanning SCSI busses) will not be performed by this ioctl.</dd>
  <dt id="IOPIOCGTIDMAP"><a class="permalink" href="#IOPIOCGTIDMAP"><code class="Dv">IOPIOCGTIDMAP
    (struct iovec)</code></a></dt>
  <dd>Retrieve the TID to device map. This map indicates which targets are
      configured, and what the corresponding device name for each is. Although
      at any given point it contains the same number of entries as the LCT, the
      number of entries should be determined using the iov_len field from the
      returned iovec.
    <div class="Bd Pp Li">
    <pre>struct iop_tidmap {
	u_short	it_tid;
	u_short	it_flags;
	char	it_dvname[16];	/* DEVICE_XNAME_SIZE */
};
#define	IT_CONFIGURED	0x02	/* target configured */</pre>
    </div>
  </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">/dev/iop</span><var class="Ar">u</var></dt>
  <dd>control device for IOP unit <var class="Ar">u</var></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">dpti(4)</a>, <a class="Xr">intro(4)</a>,
    <a class="Xr">iopsp(4)</a>, <a class="Xr">ld(4)</a>,
    <a class="Xr">iopctl(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">iop</code> driver first appeared in
    <span class="Ux">NetBSD 1.5.3</span>.</p>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date">December 2, 2007</td>
    <td class="foot-os">NetBSD 10.1</td>
  </tr>
</table>