.\" This documentation was generated from the book titled "SCSI Subsystem Interfaces", which is part of the Linux kernel source. .\" .\" Documentation by: Douglas Gilbert (dgilbert@interlog.com) .\" Documentation copyright: 2002 2003 Douglas Gilbert .\" This documentation comes with the following legal notice: .\" .\" This documentation is free software; you can redistribute .\" it and/or modify it under the terms of the GNU General Public .\" License as published by the Free Software Foundation; either .\" version 2 of the License, or (at your option) any later .\" version. .\" .\" This program is distributed in the hope that it will be .\" useful, but WITHOUT ANY WARRANTY; without even the implied .\" warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .\" See the GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this program; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, .\" MA 02111-1307 USA .\" .\" For more details see the file COPYING in the source .\" distribution of Linux. .\" .\" For comments on the formatting of this manpage, please contact Michael Still .\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "SCSI_ADD_DEVICE" "9" "09 April 2004" "" "" .SH NAME scsi_add_device \- creates new scsi device (lu) instance .SH SYNOPSIS .sp \fB .sp struct scsi_device * scsi_add_device (struct Scsi_Host * \fIshost\fB, unsigned int \fIchannel\fB, unsigned int \fIid\fB, unsigned int \fIlun\fB); \fR .SH "ARGUMENTS" .TP \fB\fIshost\fB\fR pointer to scsi host instance .TP \fB\fIchannel\fB\fR channel number (rarely other than 0) .TP \fB\fIid\fB\fR target id number .TP \fB\fIlun\fB\fR logical unit number .SH "DESCRIPTION" .PP Returns pointer to new struct scsi_device instance or ERR_PTR(-ENODEV) (or some other bent pointer) if something is wrong (e.g. no lu responds at given address) .SH "MIGHT BLOCK" .PP yes .SH "NOTES" .PP This call is usually performed internally during a scsi bus scan when an HBA is added (i.e. \fBscsi_add_host\fR). So it should only be called if the HBA becomes aware of a new scsi device (lu) after \fBscsi_add_host\fR has completed. If successful this call we lead to \fBslave_alloc\fR and \fBslave_configure\fR callbacks into the LLD. .SH "DEFINED IN" .PP drivers/scsi/scsi_scan.c .SH "ABOUT THIS DOCUMENT" .PP This documentation was generated with kernel version 2.6.0.