'\" t .\" Title: mpt_register .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Message-based devices .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "MPT_REGISTER" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Message-based devices" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" mpt_register \- Register protocol\-specific main callback handler\&. .SH "SYNOPSIS" .HP \w'u8\ mpt_register('u .BI "u8 mpt_register(MPT_CALLBACK\ " "cbfunc" ", MPT_DRIVER_CLASS\ " "dclass" ", char\ *\ " "func_name" ");" .SH "ARGUMENTS" .PP \fIcbfunc\fR .RS 4 callback function pointer .RE .PP \fIdclass\fR .RS 4 Protocol driver\*(Aqs class (\fBMPT_DRIVER_CLASS\fR enum value) .RE .PP \fIfunc_name\fR .RS 4 call function\*(Aqs name .RE .SH "DESCRIPTION" .PP 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\&. .SH "NOTES" .PP The SCSI protocol driver currently calls this routine thrice in order to register separate callbacks; one for \(lqnormal\(rq SCSI IO; one for MptScsiTaskMgmt requests; one for Scan/DV requests\&. .PP Returns u8 valued \(lqhandle\(rq 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\&. .SH "COPYRIGHT" .br