1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ccw_device_start_timeout_key</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Writing s390 channel device drivers"><link rel="up" href="ccwdev.html" title="ccw devices"><link rel="prev" href="API-ccw-device-start-key.html" title="ccw_device_start_key"><link rel="next" href="API-ccw-device-start.html" title="ccw_device_start"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">ccw_device_start_timeout_key</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-ccw-device-start-key.html">Prev</a>&#160;</td><th width="60%" align="center">ccw devices</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-ccw-device-start.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-ccw-device-start-timeout-key"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ccw_device_start_timeout_key &#8212; 
2     start a s390 channel program with timeout and key
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">ccw_device_start_timeout_key </b>(</code></td><td>struct ccw_device * <var class="pdparam">cdev</var>, </td></tr><tr><td>&#160;</td><td>struct ccw1 * <var class="pdparam">cpa</var>, </td></tr><tr><td>&#160;</td><td>unsigned long <var class="pdparam">intparm</var>, </td></tr><tr><td>&#160;</td><td>__u8 <var class="pdparam">lpm</var>, </td></tr><tr><td>&#160;</td><td>__u8 <var class="pdparam">key</var>, </td></tr><tr><td>&#160;</td><td>unsigned long <var class="pdparam">flags</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">expires</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1124296820"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>cdev</code></em></span></dt><dd><p>
4     target ccw device
5    </p></dd><dt><span class="term"><em class="parameter"><code>cpa</code></em></span></dt><dd><p>
6     logical start address of channel program
7    </p></dd><dt><span class="term"><em class="parameter"><code>intparm</code></em></span></dt><dd><p>
8     user specific interruption parameter; will be presented back to
9     <em class="parameter"><code>cdev</code></em>'s interrupt handler. Allows a device driver to associate
10     the interrupt with a particular I/O request.
11    </p></dd><dt><span class="term"><em class="parameter"><code>lpm</code></em></span></dt><dd><p>
12     defines the channel path to be used for a specific I/O request. A
13     value of 0 will make cio use the opm.
14    </p></dd><dt><span class="term"><em class="parameter"><code>key</code></em></span></dt><dd><p>
15     storage key to be used for the I/O
16    </p></dd><dt><span class="term"><em class="parameter"><code>flags</code></em></span></dt><dd><p>
17     additional flags; defines the action to be performed for I/O
18     processing.
19    </p></dd><dt><span class="term"><em class="parameter"><code>expires</code></em></span></dt><dd><p>
20     timeout value in jiffies
21    </p></dd></dl></div></div><div class="refsect1"><a name="idp1124304988"></a><h2>Description</h2><p>
22   Start a S/390 channel program. When the interrupt arrives, the
23   IRQ handler is called, either immediately, delayed (dev-end missing,
24   or sense required) or never (no IRQ handler registered).
25   This function notifies the device driver if the channel program has not
26   completed during the time specified by <em class="parameter"><code>expires</code></em>. If a timeout occurs, the
27   channel program is terminated via xsch, hsch or csch, and the device's
28   interrupt handler will be called with an irb containing ERR_PTR(-<code class="constant">ETIMEDOUT</code>).
29</p></div><div class="refsect1"><a name="idp1124306572"></a><h2>Returns</h2><p>
30   <code class="constant">0</code>, if the operation was successful;
31   -<code class="constant">EBUSY</code>, if the device is busy, or status pending;
32   -<code class="constant">EACCES</code>, if no path specified in <em class="parameter"><code>lpm</code></em> is operational;
33   -<code class="constant">ENODEV</code>, if the device is not operational.
34</p></div><div class="refsect1"><a name="idp1124308380"></a><h2>Context</h2><p>
35   Interrupts disabled, ccw device lock held
36</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-ccw-device-start-key.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ccwdev.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-ccw-device-start.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">ccw_device_start_key</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">ccw_device_start</span></td></tr></table></div></body></html>
37