'\" t .\" Title: ata_host_activate .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: June 2017 .\" Manual: libata Library .\" Source: Kernel Hackers Manual 4.11.3 .\" Language: English .\" .TH "ATA_HOST_ACTIVATE" "9" "June 2017" "Kernel Hackers Manual 4\&.11\&" "libata Library" .\" ----------------------------------------------------------------- .\" * 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" ata_host_activate \- start host, request IRQ and register it .SH "SYNOPSIS" .HP \w'int\ ata_host_activate('u .BI "int ata_host_activate(struct\ ata_host\ *\ " "host" ", int\ " "irq" ", irq_handler_t\ " "irq_handler" ", unsigned\ long\ " "irq_flags" ", struct\ scsi_host_template\ *\ " "sht" ");" .SH "ARGUMENTS" .PP \fIstruct ata_host * host\fR .RS 4 target ATA host .RE .PP \fIint irq\fR .RS 4 IRQ to request .RE .PP \fIirq_handler_t irq_handler\fR .RS 4 irq_handler used when requesting IRQ .RE .PP \fIunsigned long irq_flags\fR .RS 4 irq_flags used when requesting IRQ .RE .PP \fIstruct scsi_host_template * sht\fR .RS 4 scsi_host_template to use when registering the host .RE .SH "DESCRIPTION" .PP After allocating an ATA host and initializing it, most libata LLDs perform three steps to activate the host \- start host, request IRQ and register it\&. This helper takes necessary arguments and performs the three steps in one go\&. .PP An invalid IRQ skips the IRQ registration and expects the host to have set polling mode on the port\&. In this case, \fIirq_handler\fR should be NULL\&. .PP LOCKING: Inherited from calling layer (may sleep)\&. .SH "RETURN" .PP 0 on success, \-errno otherwise\&. .SH "AUTHOR" .PP \fBJeff Garzik\fR .RS 4 Author. .RE .SH "COPYRIGHT" .br