1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>usb_clear_halt</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux-USB Host Side API"><link rel="up" href="usbcore.html" title="Chapter 5. USB Core APIs"><link rel="prev" href="API-usb-get-status.html" title="usb_get_status"><link rel="next" href="API-usb-reset-endpoint.html" title="usb_reset_endpoint"></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">usb_clear_halt</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-usb-get-status.html">Prev</a> </td><th width="60%" align="center">Chapter 5. USB Core APIs</th><td width="20%" align="right"> <a accesskey="n" href="API-usb-reset-endpoint.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-usb-clear-halt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>usb_clear_halt — 2 tells device to clear endpoint halt/stall condition 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">usb_clear_halt </b>(</code></td><td>struct usb_device * <var class="pdparam">dev</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">pipe</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1116248972"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>dev</code></em></span></dt><dd><p> 4 device whose endpoint is halted 5 </p></dd><dt><span class="term"><em class="parameter"><code>pipe</code></em></span></dt><dd><p> 6 endpoint <span class="quote">“<span class="quote">pipe</span>”</span> being cleared 7 </p></dd></dl></div></div><div class="refsect1"><a name="idp1116251692"></a><h2>Context</h2><p> 8 !in_interrupt () 9</p></div><div class="refsect1"><a name="idp1116252268"></a><h2>Description</h2><p> 10 This is used to clear halt conditions for bulk and interrupt endpoints, 11 as reported by URB completion status. Endpoints that are halted are 12 sometimes referred to as being <span class="quote">“<span class="quote">stalled</span>”</span>. Such endpoints are unable 13 to transmit or receive data until the halt status is cleared. Any URBs 14 queued for such an endpoint should normally be unlinked by the driver 15 before clearing the halt condition, as described in sections 5.7.5 16 and 5.8.5 of the USB 2.0 spec. 17 </p><p> 18 19 Note that control and isochronous endpoints don't halt, although control 20 endpoints report <span class="quote">“<span class="quote">protocol stall</span>”</span> (for unsupported requests) using the 21 same status code used to report a true stall. 22 </p><p> 23 24 This call is synchronous, and may not be used in an interrupt context. 25</p></div><div class="refsect1"><a name="idp1116254260"></a><h2>Return</h2><p> 26 Zero on success, or else the status code returned by the 27 underlying <code class="function">usb_control_msg</code> call. 28</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-usb-get-status.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="usbcore.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-usb-reset-endpoint.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">usb_get_status</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">usb_reset_endpoint</span></td></tr></table></div></body></html> 29