1. NAME

scsi_alloc_target - allocate a new or find an existing target

2. SYNOPSIS

struct scsi_target * scsi_alloc_target(struct device *  parent , int  channel , uint  id );

3. ARGUMENTS

parent
    parent of the target (need not be a scsi host)

channel
    target channel number (zero if no channels)

id
    target id number

4. DESCRIPTION

Return an existing target if one exists, provided it hasnAqt already gone into STARGET_DEL state, otherwise allocate a new target.

The target is returned with an incremented reference, so the caller is responsible for both reaping and doing a last put

5. AUTHORS

James Bottomley <>
    Author.

Rob Landley <>
    Author.

6. COPYRIGHT