1scsi_hba_tran(9S)         Data Structures for Drivers        scsi_hba_tran(9S)
2
3
4

NAME

6       scsi_hba_tran  -  SCSI  Host  Bus Adapter (HBA) driver transport vector
7       structure
8

SYNOPSIS

10       #include <sys/scsi/scsi.h>
11
12

INTERFACE LEVEL

14       Solaris architecture specific (Solaris DDI).
15

DESCRIPTION

17       A scsi_hba_tran_t structure defines vectors that an HBA driver  exports
18       to SCSA interfaces so that HBA specific functions can be executed.
19

STRUCTURE MEMBERS

21         dev_info_t          *tran_hba_dip;          /* HBAs dev_info
22                                                         pointer */
23         void                *tran_hba_private;      /* HBA softstate */
24         void                *tran_tgt_private;      /* HBA target private
25                                                         pointer */
26         struct scsi_device  *tran_sd;               /* scsi_device */
27         int                 (*tran_tgt_init)( );    /* Transport target */
28                                                         Initialization */
29         int                 (*tran_tgt_probe)( );   /* Transport target
30                                                         probe */
31         void                (*tran_tgt_free)( );    /* Transport target
32                                                         free */
33         int                 (*tran_start)( );       /* Transport start */
34         int                 (*tran_reset)( );       /* Transport reset */
35         int                 (*tran_abort)( );       /* Transport abort */
36         int                 (*tran_getcap)( );      /* Capability
37                                                         retrieval */
38         int                 (*tran_setcap)( );      /* Capability
39                                                         establishment */
40         struct scsi_pkt     *(*tran_init_pkt)( );   /* Packet and DMA
41                                                         allocation */
42         void                (*tran_destroy_pkt)( ); /* Packet and DMA */
43                                                         deallocation */
44         void                (*tran_dmafree)( );     /* DMA deallocation */
45         void                (*tran_sync_pkt)( );    /* Sync DMA */
46         void                (*tran_reset_notify)( );/* Bus reset
47                                                         notification */
48         int                 (*tran_bus_reset)( );   /* Reset bus only */
49         int                 (*tran_quiesce)( );     /* Quiesce a bus */
50         int                 (*tran_unquiesce)( );   /* Unquiesce a bus */
51         int                 (*tran_setup_pkt)( );   /* Initialization
52                                                         for pkt */
53         int                 (*tran_teardown_pkt)( );/* Deallocation */
54         int                 (*tran_pkt_constructor) ( );
55                                                        /* Constructor */
56         int                 (*tran_pkt_destructor) ( );
57                                                       /* Destructor */
58         int                 tran_hba_len;            /* # bytes for
59                                                          pkt_ha_private */
60         int                 tran_interconnect_type;  /* transport
61                                                          interconnect */
62
63
64       tran_hba_dip              dev_info pointer to the HBA that supplies the
65                                 scsi_hba_tran structure.
66
67
68       tran_hba_private          Private pointer that the HBA driver  can  use
69                                 to  refer  to  the device's soft state struc‐
70                                 ture.
71
72
73       tran_tgt_private          Private pointer that the HBA can use to refer
74                                 to  per-target  specific data. This field can
75                                 only be  used  when  the  SCSI_HBA_TRAN_CLONE
76                                 flag  is specified in scsi_hba_attach(9F). In
77                                 this case, the  HBA  driver  must  initialize
78                                 this  field  in  its  tran_tgt_init(9E) entry
79                                 point.
80
81
82       tran_sd                   Pointer  to  scsi_device(9S)   structure   if
83                                 cloning; otherwise NULL.
84
85
86       tran_tgt_init             Function  entry  that  allows  per-target HBA
87                                 initialization, if necessary.
88
89
90       tran_tgt_probe            Function   entry   that   allows   per-target
91                                 scsi_probe(9F) customization, if necessary.
92
93
94       tran_tgt_free             Function  entry  that  allows  per-target HBA
95                                 deallocation, if necessary.
96
97
98       tran_start                Function entry that  starts  a  SCSI  command
99                                 execution on the HBA hardware.
100
101
102       tran_reset                Function entry that resets a SCSI bus or tar‐
103                                 get device.
104
105
106       tran_abort                Function entry that aborts one SCSI  command,
107                                 or all pending SCSI commands.
108
109
110       tran_getcap               Function entry that retrieves a SCSI capabil‐
111                                 ity.
112
113
114       tran_setcap               Function entry that sets a SCSI capability.
115
116
117       tran_init_pkt             Function  entry  that  allocates  a  scsi_pkt
118                                 structure.
119
120
121       tran_destroy_pkt          Function  entry  that frees a scsi_pkt struc‐
122                                 ture allocated by tran_init_pkt.
123
124
125       tran_dmafree              Function entry that frees DMA resources  that
126                                 were  previously  allocated by tran_init_pkt.
127                                 Not called for HBA  drivers  that  provide  a
128                                 tran_setup_pkt entry point.
129
130
131       tran_sync_pkt             Synchronizes  data in pkt after a data trans‐
132                                 fer has been completed. Not  called  for  HBA
133                                 drivers  that  provide a tran_setup_pkt entry
134                                 point.
135
136
137       tran_reset_notify         Function entry that allows a target to regis‐
138                                 ter a bus reset notification request with the
139                                 HBA driver.
140
141
142       tran_bus_reset            Function entry that resets the SCSI bus with‐
143                                 out resetting targets.
144
145
146       tran_quiesce              Function entry that waits for all outstanding
147                                 commands to complete and blocks  (or  queues)
148                                 any I/O requests issued.
149
150
151       tran_unquiesce            Function  entry that allows I/O activities to
152                                 resume on the SCSI bus.
153
154
155       tran_setup_pkt            Optional  entry  point  that  initializes   a
156                                 scsi_pkt structure. See tran_setup_pkt(9E).
157
158
159       tran_teardown_pkt         Entry point that releases resources allocated
160                                 by tran_setup_pkt.
161
162
163       tran_pkt_constructor      Additional optional entry point that performs
164                                 the  actions  of a constructor. See tran_set‐
165                                 up_pkt(9E).
166
167
168       tran_pkt_destructor       Additional optional entry point that performs
169                                 the  actions  of  a destructor. See tran_set‐
170                                 up_pkt(9E).
171
172
173       tran_hba_len              Size   of   pkt_ha_private.   See   tran_set‐
174                                 up_pkt(9E).
175
176
177       tran_interconnect_type    Integer  value  that denotes the interconnect
178                                 type of the transport as defined in the  ser‐
179                                 vices.h header file.
180
181

SEE ALSO

183       tran_abort(9E),        tran_bus_reset(9E),        tran_destroy_pkt(9E),
184       tran_dmafree(9E), tran_getcap(9E), tran_init_pkt(9E), tran_quiesce(9E),
185       tran_reset(9E),   tran_reset_notify(9E),   tran_setcap(9E),   tran_set‐
186       up_pkt(9E),   tran_start(9E),   tran_sync_pkt(9E),   tran_tgt_free(9E),
187       tran_tgt_init(9E),        tran_tgt_probe(9E),       tran_unquiesce(9E),
188       ddi_dma_sync(9F),     scsi_hba_attach(9F),      scsi_hba_pkt_alloc(9F),
189       scsi_hba_pkt_free(9F), scsi_probe(9F), scsi_device(9S), scsi_pkt(9S)
190
191
192       Writing Device Drivers
193
194
195
196SunOS 5.11                        30 May 2006                scsi_hba_tran(9S)
Impressum