1SCSI_ALLOC_SDEV(9)              SCSI mid layer              SCSI_ALLOC_SDEV(9)
2
3
4

NAME

6       scsi_alloc_sdev - allocate and setup a scsi_Device
7

SYNOPSIS

9       struct scsi_device * scsi_alloc_sdev(struct scsi_target * starget,
10                                            unsigned int lun,
11                                            void * hostdata);
12

ARGUMENTS

14       starget
15           which target to allocate a scsi_device for
16
17       lun
18           which lun
19
20       hostdata
21           usually NULL and set by ->slave_alloc instead
22

DESCRIPTION

24       Allocate, initialize for io, and return a pointer to a scsi_Device.
25       Stores the shost, channel, id, and lun in the scsi_Device, and adds
26       scsi_Device to the appropriate list.
27

RETURN VALUE

29       scsi_Device pointer, or NULL on failure.
30

AUTHORS

32       James Bottomley <James.Bottomley@hansenpartnership.com>
33           Author.
34
35       Rob Landley <rob@landley.net>
36           Author.
37
39Kernel Hackers Manual 3.10         June 2019                SCSI_ALLOC_SDEV(9)
Impressum