'\" t .\" Title: scsi_alloc_sdev .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: June 2017 .\" Manual: SCSI mid layer .\" Source: Kernel Hackers Manual 4.11.3 .\" Language: English .\" .TH "SCSI_ALLOC_SDEV" "9" "June 2017" "Kernel Hackers Manual 4\&.11\&" "SCSI mid layer" .\" ----------------------------------------------------------------- .\" * 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" scsi_alloc_sdev \- allocate and setup a scsi_Device .SH "SYNOPSIS" .HP \w'struct\ scsi_device\ *\ scsi_alloc_sdev('u .BI "struct scsi_device * scsi_alloc_sdev(struct\ scsi_target\ *\ " "starget" ", u64\ " "lun" ", void\ *\ " "hostdata" ");" .SH "ARGUMENTS" .PP \fIstruct scsi_target * starget\fR .RS 4 which target to allocate a &scsi_device for .RE .PP \fIu64 lun\fR .RS 4 which lun .RE .PP \fIvoid * hostdata\fR .RS 4 usually NULL and set by \->slave_alloc instead .RE .SH "DESCRIPTION" .PP Allocate, initialize for io, and return a pointer to a scsi_Device\&. Stores the \fIshost\fR, \fIchannel\fR, \fIid\fR, and \fIlun\fR in the scsi_Device, and adds scsi_Device to the appropriate list\&. .PP Return value: scsi_Device pointer, or NULL on failure\&. .SH "AUTHORS" .PP \fBJames Bottomley\fR <\&James.Bottomley@hansenpartnership.com\&> .RS 4 Author. .RE .PP \fBRob Landley\fR <\&rob@landley.net\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br