1scsi_hba_tran_alloc(9F) Kernel Functions for Drivers scsi_hba_tran_alloc(9F)
2
3
4
6 scsi_hba_tran_alloc, scsi_hba_tran_free - allocate and free transport
7 structures
8
10 #include <sys/scsi/scsi.h>
11
12
13
14 scsi_hba_tran_t *scsi_hba_tran_alloc(dev_info_t *dip, int flags);
15
16
17 void scsi_hba_tran_free(scsi_hba_tran_t *hba_tran);
18
19
21 Solaris architecture specific (Solaris DDI).
22
24 dip Pointer to a dev_info structure, defining the HBA driver
25 instance.
26
27
28 flag Flag modifiers. The only possible flag value is
29 SCSI_HBA_CANSLEEP (memory allocation may sleep).
30
31
32 hba_tran Pointer to a scsi_hba_tran(9S) structure.
33
34
36 For scsi_hba_tran_alloc():
37
38
39 The scsi_hba_tran_alloc() function allocates a scsi_hba_tran(9S)
40 structure for a HBA driver. The HBA must use this structure to register
41 its transport vectors with the system by using scsi_hba_attach_set‐
42 up(9F).
43
44
45 If the flag SCSI_HBA_CANSLEEP is set in flags, scsi_hba_tran_alloc()
46 may sleep when allocating resources; otherwise it may not sleep, and
47 callers should be prepared to deal with allocation failures.
48
49
50 For scsi_hba_tran_free():
51
52
53 The scsi_hba_tran_free() function is used to free the scsi_hba_tran(9S)
54 structure allocated by scsi_hba_tran_alloc().
55
57 The scsi_hba_tran_alloc() function returns a pointer to the allocated
58 transport structure, or NULL if no space is available.
59
61 The scsi_hba_tran_alloc() function can be called from user, interrupt,
62 or kernel context. Drivers must not allow scsi_hba_tran_alloc() to
63 sleep if called from an interrupt routine.
64
65
66 The scsi_hba_tran_free() function can be called from user, interrupt,
67 or kernel context context.
68
70 scsi_hba_attach_setup(9F), scsi_hba_tran(9S)
71
72
73 Writing Device Drivers
74
75
76
77SunOS 5.11 16 Jan 2006 scsi_hba_tran_alloc(9F)