1tran_tgt_init(9E)             Driver Entry Points            tran_tgt_init(9E)
2
3
4

NAME

6       tran_tgt_init - request to initialize HBA resources on behalf of a par‐
7       ticular target
8

SYNOPSIS

10       #include <sys/scsi/scsi.h>
11
12
13
14       void prefixtran_tgt_init(dev_info_t *hba_dip, dev_info_t *tgt_dip,
15            scsi_hba_tran_t *hba_tran, struct scsi_device *sd);
16
17

INTERFACE LEVEL

19       Solaris architecture specific (Solaris DDI).
20

PARAMETERS

22       hba_dip      Pointer to a  dev_info_t structure, referring to  the  HBA
23                    device instance.
24
25
26       tgt_dip      Pointer to a dev_info_t structure, referring to the target
27                    device instance.
28
29
30       hba_tran     Pointer to a  scsi_hba_tran(9S) structure,  consisting  of
31                    the HBA's transport vectors.
32
33
34       sd           Pointer  to  a   scsi_device(9S) structure, describing the
35                    target.
36
37

DESCRIPTION

39       The tran_tgt_init() vector in the scsi_hba_tran(9S)  structure  may  be
40       initialized  during  the  HBA  driver's  attach(9E)  to point to an HBA
41       driver function to be called by the system when an instance of a target
42       device  is  being created.  The tran_tgt_init() vector, if not  NULL,is
43       called after the dev_info node structure is  created  for  this  target
44       device  instance,  but  before  probe(9E)  for this instance is called.
45       Before receiving transport requests from the  target  driver  instance,
46       the  HBA  may  perform  any initialization required for this particular
47       target during the call of the tran_tgt_init() vector.
48
49
50       Note that hba_tran will point to a cloned copy of  the  scsi_hba_tran_t
51       structure  allocated  by the HBA driver if the SCSI_HBA_TRAN_CLONE flag
52       was specified in the call to scsi_hba_attach(9F). In this case, the HBA
53       driver  may  choose  to  initialize  the  tran_tgt_private field in the
54       structure pointed to by hba_tran, to point to the data specific to  the
55       particular target device instance.
56

RETURN VALUES

58       tran_tgt_init() must return:
59
60       DDI_SUCCESS     the  HBA  driver  can support the addressed target, and
61                       was able to initialize per-target resources.
62
63
64       DDI_FAILURE     the HBA driver cannot support the addressed target,  or
65                       was  unable to initialize per-target resources. In this
66                       event, the initialization of this instance of the  tar‐
67                       get  device  will not be continued, the target driver's
68                       probe(9E) will not be called, and the tgt_dip structure
69                       destroyed.
70
71

SEE ALSO

73       attach(9E),     probe(9E),    tran_tgt_free(9E),    tran_tgt_probe(9E),
74       scsi_hba_attach_setup(9F), scsi_device(9S), scsi_hba_tran(9S)
75
76
77       Writing Device Drivers
78
79
80
81SunOS 5.11                        1 Nov 1993                 tran_tgt_init(9E)
Impressum