<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>mpt_register</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Device Drivers" /><link rel="up" href="ch04.html#id2637965" title="Fusion message devices" /><link rel="prev" href="ch04.html" title="Chapter 4. Message-based devices" /><link rel="next" href="re301.html" title="mpt_deregister" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>mpt_register</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04.html">Prev</a> </td><th width="60%" align="center">Fusion message devices</th><td width="20%" align="right"> <a accesskey="n" href="re301.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="mpt_register"><a id="API-mpt-register"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>mpt_register — Register protocol-specific main callback handler. </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">u8 <b class="fsfunc">mpt_register </b>(</code></td><td>MPT_CALLBACK <var class="pdparam">cbfunc</var>, </td></tr><tr><td> </td><td>MPT_DRIVER_CLASS <var class="pdparam">dclass</var>, </td></tr><tr><td> </td><td>char * <var class="pdparam">func_name</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1" title="Arguments"><a id="id2638068"></a><h2>Arguments</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>cbfunc</code></em></span></dt><dd><p> callback function pointer </p></dd><dt><span class="term"><em class="parameter"><code>dclass</code></em></span></dt><dd><p> Protocol driver's class (<code class="constant">MPT_DRIVER_CLASS</code> enum value) </p></dd><dt><span class="term"><em class="parameter"><code>func_name</code></em></span></dt><dd><p> -- undescribed -- </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2638132"></a><h2>Description</h2><p> This routine is called by a protocol-specific driver (SCSI host, LAN, SCSI target) to register its reply callback routine. Each protocol-specific driver must do this before it will be able to use any IOC resources, such as obtaining request frames. </p></div><div class="refsect1" title="NOTES"><a id="id2638147"></a><h2>NOTES</h2><p> The SCSI protocol driver currently calls this routine thrice in order to register separate callbacks; one for <span class="quote">“<span class="quote">normal</span>”</span> SCSI IO; one for MptScsiTaskMgmt requests; one for Scan/DV requests. </p><p> Returns u8 valued <span class="quote">“<span class="quote">handle</span>”</span> in the range (and S.O.D. order) {N,...,7,6,5,...,1} if successful. A return value of MPT_MAX_PROTOCOL_DRIVERS (including zero!) should be considered an error by the caller. </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04.html#id2637965">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re301.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Message-based devices </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span>mpt_deregister</span></td></tr></table></div></body></html>