Blame view

Documentation/scsi/scsi_fc_transport.txt 21.4 KB
a53eb5e06   James Smart   [SCSI] FC Transpo...
1
2
                               SCSI FC Tansport
                   =============================================
9e4f5e296   James Smart   [SCSI] FC Pass Th...
3
  Date:  11/18/2008
a53eb5e06   James Smart   [SCSI] FC Transpo...
4
5
  Kernel Revisions for features:
    rports : <<TBS>>
9e4f5e296   James Smart   [SCSI] FC Pass Th...
6
7
    vports : 2.6.22
    bsg support : 2.6.30 (?TBD?)
a53eb5e06   James Smart   [SCSI] FC Transpo...
8
9
10
11
12
13
14
15
16
17
  
  
  Introduction
  ============
  This file documents the features and components of the SCSI FC Transport.
  It also provides documents the API between the transport and FC LLDDs.
  The FC transport can be found at:
    drivers/scsi/scsi_transport_fc.c
    include/scsi/scsi_transport_fc.h
    include/scsi/scsi_netlink_fc.h
9e4f5e296   James Smart   [SCSI] FC Pass Th...
18
    include/scsi/scsi_bsg_fc.h
a53eb5e06   James Smart   [SCSI] FC Transpo...
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  
  This file is found at Documentation/scsi/scsi_fc_transport.txt
  
  
  FC Remote Ports (rports)
  ========================================================================
  << To Be Supplied >>
  
  
  FC Virtual Ports (vports)
  ========================================================================
  
  Overview:
  -------------------------------
  
    New FC standards have defined mechanisms which allows for a single physical
    port to appear on as multiple communication ports. Using the N_Port Id
    Virtualization (NPIV) mechanism, a point-to-point connection to a Fabric
    can be assigned more than 1 N_Port_ID.  Each N_Port_ID appears as a
    separate port to other endpoints on the fabric, even though it shares one
    physical link to the switch for communication. Each N_Port_ID can have a
    unique view of the fabric based on fabric zoning and array lun-masking
    (just like a normal non-NPIV adapter).  Using the Virtual Fabric (VF)
    mechanism, adding a fabric header to each frame allows the port to
    interact with the Fabric Port to join multiple fabrics. The port will
    obtain an N_Port_ID on each fabric it joins. Each fabric will have its
    own unique view of endpoints and configuration parameters.  NPIV may be
    used together with VF so that the port can obtain multiple N_Port_IDs
    on each virtual fabric.
  
    The FC transport is now recognizing a new object - a vport.  A vport is
    an entity that has a world-wide unique World Wide Port Name (wwpn) and
    World Wide Node Name (wwnn). The transport also allows for the FC4's to
    be specified for the vport, with FCP_Initiator being the primary role
    expected. Once instantiated by one of the above methods, it will have a
    distinct N_Port_ID and view of fabric endpoints and storage entities.
    The fc_host associated with the physical adapter will export the ability
    to create vports. The transport will create the vport object within the
    Linux device tree, and instruct the fc_host's driver to instantiate the
    virtual port. Typically, the driver will create a new scsi_host instance
    on the vport, resulting in a unique <H,C,T,L> namespace for the vport.
    Thus, whether a FC port is based on a physical port or on a virtual port,
    each will appear as a unique scsi_host with its own target and lun space.
  
    Note: At this time, the transport is written to create only NPIV-based
      vports. However, consideration was given to VF-based vports and it
      should be a minor change to add support if needed.  The remaining
      discussion will concentrate on NPIV.
  
    Note: World Wide Name assignment (and uniqueness guarantees) are left
d91958815   Matt LaPlante   Documentation cle...
69
      up to an administrative entity controlling the vport. For example,
a53eb5e06   James Smart   [SCSI] FC Transpo...
70
71
      if vports are to be associated with virtual machines, a XEN mgmt
      utility would be responsible for creating wwpn/wwnn's for the vport,
a33f32244   Francis Galiegue   Documentation/: i...
72
      using its own naming authority and OUI. (Note: it already does this
a53eb5e06   James Smart   [SCSI] FC Transpo...
73
74
75
76
77
78
79
80
81
82
      for virtual MAC addresses).
  
  
  Device Trees and Vport Objects:
  -------------------------------
  
    Today, the device tree typically contains the scsi_host object,
    with rports and scsi target objects underneath it. Currently the FC
    transport creates the vport object and places it under the scsi_host
    object corresponding to the physical adapter.  The LLDD will allocate
a33f32244   Francis Galiegue   Documentation/: i...
83
    a new scsi_host for the vport and link its object under the vport.
a53eb5e06   James Smart   [SCSI] FC Transpo...
84
85
86
87
88
89
90
91
92
93
94
    The remainder of the tree under the vports scsi_host is the same
    as the non-NPIV case. The transport is written currently to easily
    allow the parent of the vport to be something other than the scsi_host.
    This could be used in the future to link the object onto a vm-specific
    device tree. If the vport's parent is not the physical port's scsi_host,
    a symbolic link to the vport object will be placed in the physical
    port's scsi_host.
  
    Here's what to expect in the device tree :
     The typical Physical Port's Scsi_Host:
       /sys/devices/.../host17/
d91958815   Matt LaPlante   Documentation cle...
95
     and it has the typical descendant tree:
a53eb5e06   James Smart   [SCSI] FC Transpo...
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
       /sys/devices/.../host17/rport-17:0-0/target17:0:0/17:0:0:0:
     and then the vport is created on the Physical Port:
       /sys/devices/.../host17/vport-17:0-0
     and the vport's Scsi_Host is then created:
       /sys/devices/.../host17/vport-17:0-0/host18
     and then the rest of the tree progresses, such as:
       /sys/devices/.../host17/vport-17:0-0/host18/rport-18:0-0/target18:0:0/18:0:0:0:
  
    Here's what to expect in the sysfs tree :
     scsi_hosts:
       /sys/class/scsi_host/host17                physical port's scsi_host
       /sys/class/scsi_host/host18                vport's scsi_host
     fc_hosts:
       /sys/class/fc_host/host17                  physical port's fc_host
       /sys/class/fc_host/host18                  vport's fc_host
     fc_vports:
       /sys/class/fc_vports/vport-17:0-0          the vport's fc_vport
     fc_rports:
       /sys/class/fc_remote_ports/rport-17:0-0    rport on the physical port
       /sys/class/fc_remote_ports/rport-18:0-0    rport on the vport
  
  
  Vport Attributes:
  -------------------------------
  
    The new fc_vport class object has the following attributes
9ef3e4a45   James Smart   [SCSI] fc_transpo...
122
       node_name:                                                 Read_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
123
         The WWNN of the vport
9ef3e4a45   James Smart   [SCSI] fc_transpo...
124
       port_name:                                                 Read_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
125
         The WWPN of the vport
9ef3e4a45   James Smart   [SCSI] fc_transpo...
126
       roles:                                                     Read_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
127
         Indicates the FC4 roles enabled on the vport.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
128
       symbolic_name:                                             Read_Write
a53eb5e06   James Smart   [SCSI] FC Transpo...
129
130
131
132
133
         A string, appended to the driver's symbolic port name string, which
         is registered with the switch to identify the vport. For example,
         a hypervisor could set this string to "Xen Domain 2 VM 5 Vport 2",
         and this set of identifiers can be seen on switch management screens
         to identify the port.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
134
       vport_delete:                                              Write_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
135
         When written with a "1", will tear down the vport.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
136
       vport_disable:                                             Write_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
137
138
139
140
         When written with a "1", will transition the vport to a disabled.
         state.  The vport will still be instantiated with the Linux kernel,
         but it will not be active on the FC link.
         When written with a "0", will enable the vport.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
141
       vport_last_state:                                          Read_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
142
143
         Indicates the previous state of the vport.  See the section below on
         "Vport States".
9ef3e4a45   James Smart   [SCSI] fc_transpo...
144
       vport_state:                                               Read_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
145
146
         Indicates the state of the vport.  See the section below on
         "Vport States".
9ef3e4a45   James Smart   [SCSI] fc_transpo...
147
       vport_type:                                                Read_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
148
149
150
151
152
         Reflects the FC mechanism used to create the virtual port.
         Only NPIV is supported currently.
  
  
    For the fc_host class object, the following attributes are added for vports:
9ef3e4a45   James Smart   [SCSI] fc_transpo...
153
       max_npiv_vports:                                           Read_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
154
155
         Indicates the maximum number of NPIV-based vports that the
         driver/adapter can support on the fc_host.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
156
       npiv_vports_inuse:                                         Read_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
157
158
         Indicates how many NPIV-based vports have been instantiated on the
         fc_host.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
159
       vport_create:                                              Write_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
160
161
162
163
164
         A "simple" create interface to instantiate a vport on an fc_host.
         A "<WWPN>:<WWNN>" string is written to the attribute. The transport
         then instantiates the vport object and calls the LLDD to create the
         vport with the role of FCP_Initiator.  Each WWN is specified as 16
         hex characters and may *not* contain any prefixes (e.g. 0x, x, etc).
9ef3e4a45   James Smart   [SCSI] fc_transpo...
165
       vport_delete:                                              Write_Only
a53eb5e06   James Smart   [SCSI] FC Transpo...
166
          A "simple" delete interface to teardown a vport. A "<WWPN>:<WWNN>"
9ef3e4a45   James Smart   [SCSI] fc_transpo...
167
168
169
170
          string is written to the attribute. The transport will locate the
          vport on the fc_host with the same WWNs and tear it down.  Each WWN
          is specified as 16 hex characters and may *not* contain any prefixes
          (e.g. 0x, x, etc).
a53eb5e06   James Smart   [SCSI] FC Transpo...
171
172
173
174
175
176
177
178
179
180
181
  
  
  Vport States:
  -------------------------------
  
    Vport instantiation consists of two parts:
      - Creation with the kernel and LLDD. This means all transport and
        driver data structures are built up, and device objects created.
        This is equivalent to a driver "attach" on an adapter, which is
        independent of the adapter's link state.
      - Instantiation of the vport on the FC link via ELS traffic, etc.
73ac36ea1   Coly Li   fix similar typos...
182
        This is equivalent to a "link up" and successful link initialization.
d91958815   Matt LaPlante   Documentation cle...
183
    Further information can be found in the interfaces section below for
a53eb5e06   James Smart   [SCSI] FC Transpo...
184
185
186
187
    Vport Creation.
  
    Once a vport has been instantiated with the kernel/LLDD, a vport state
    can be reported via the sysfs attribute. The following states exist:
9ef3e4a45   James Smart   [SCSI] fc_transpo...
188
      FC_VPORT_UNKNOWN            - Unknown
a53eb5e06   James Smart   [SCSI] FC Transpo...
189
190
        An temporary state, typically set only while the vport is being
        instantiated with the kernel and LLDD.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
191
      FC_VPORT_ACTIVE             - Active
a53eb5e06   James Smart   [SCSI] FC Transpo...
192
193
        The vport has been successfully been created on the FC link.
        It is fully functional.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
194
      FC_VPORT_DISABLED           - Disabled
a53eb5e06   James Smart   [SCSI] FC Transpo...
195
196
197
        The vport instantiated, but "disabled". The vport is not instantiated
        on the FC link. This is equivalent to a physical port with the
        link "down".
9ef3e4a45   James Smart   [SCSI] fc_transpo...
198
      FC_VPORT_LINKDOWN           - Linkdown
a53eb5e06   James Smart   [SCSI] FC Transpo...
199
        The vport is not operational as the physical link is not operational.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
200
      FC_VPORT_INITIALIZING       - Initializing
a53eb5e06   James Smart   [SCSI] FC Transpo...
201
202
203
204
205
206
        The vport is in the process of instantiating on the FC link.
        The LLDD will set this state just prior to starting the ELS traffic
        to create the vport. This state will persist until the vport is
        successfully created (state becomes FC_VPORT_ACTIVE) or it fails
        (state is one of the values below).  As this state is transitory,
        it will not be preserved in the "vport_last_state".
9ef3e4a45   James Smart   [SCSI] fc_transpo...
207
      FC_VPORT_NO_FABRIC_SUPP     - No Fabric Support
a53eb5e06   James Smart   [SCSI] FC Transpo...
208
209
210
211
212
        The vport is not operational. One of the following conditions were
        encountered:
         - The FC topology is not Point-to-Point
         - The FC port is not connected to an F_Port
         - The F_Port has indicated that NPIV is not supported.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
213
      FC_VPORT_NO_FABRIC_RSCS     - No Fabric Resources
a53eb5e06   James Smart   [SCSI] FC Transpo...
214
215
216
        The vport is not operational. The Fabric failed FDISC with a status
        indicating that it does not have sufficient resources to complete
        the operation.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
217
      FC_VPORT_FABRIC_LOGOUT      - Fabric Logout
a53eb5e06   James Smart   [SCSI] FC Transpo...
218
219
        The vport is not operational. The Fabric has LOGO'd the N_Port_ID
        associated with the vport.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
220
      FC_VPORT_FABRIC_REJ_WWN     - Fabric Rejected WWN
a53eb5e06   James Smart   [SCSI] FC Transpo...
221
222
        The vport is not operational. The Fabric failed FDISC with a status
        indicating that the WWN's are not valid.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
223
      FC_VPORT_FAILED             - VPort Failed
a53eb5e06   James Smart   [SCSI] FC Transpo...
224
225
226
227
228
        The vport is not operational. This is a catchall for all other
        error conditions.
  
  
    The following state table indicates the different state transitions:
9ef3e4a45   James Smart   [SCSI] fc_transpo...
229
      State              Event                            New State
a53eb5e06   James Smart   [SCSI] FC Transpo...
230
      --------------------------------------------------------------------
9ef3e4a45   James Smart   [SCSI] fc_transpo...
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
       n/a                Initialization                  Unknown
      Unknown:            Link Down                       Linkdown
                          Link Up & Loop                  No Fabric Support
                          Link Up & no Fabric             No Fabric Support
                          Link Up & FLOGI response        No Fabric Support
                            indicates no NPIV support
                          Link Up & FDISC being sent      Initializing
                          Disable request                 Disable
      Linkdown:           Link Up                         Unknown
      Initializing:       FDISC ACC                       Active
                          FDISC LS_RJT w/ no resources    No Fabric Resources
                          FDISC LS_RJT w/ invalid         Fabric Rejected WWN
                            pname or invalid nport_id
                          FDISC LS_RJT failed for         Vport Failed
                            other reasons
                          Link Down                       Linkdown
                          Disable request                 Disable
      Disable:            Enable request                  Unknown
      Active:             LOGO received from fabric       Fabric Logout
                          Link Down                       Linkdown
                          Disable request                 Disable
      Fabric Logout:      Link still up                   Unknown
a53eb5e06   James Smart   [SCSI] FC Transpo...
253
254
255
256
257
258
  
           The following 4 error states all have the same transitions:
      No Fabric Support:
      No Fabric Resources:
      Fabric Rejected WWN:
      Vport Failed:
9ef3e4a45   James Smart   [SCSI] fc_transpo...
259
260
                          Disable request                 Disable
                          Link goes down                  Linkdown
a53eb5e06   James Smart   [SCSI] FC Transpo...
261
262
263
264
265
266
267
268
  
  
  Transport <-> LLDD Interfaces :
  -------------------------------
  
  Vport support by LLDD:
  
    The LLDD indicates support for vports by supplying a vport_create()
25985edce   Lucas De Marchi   Fix common misspe...
269
    function in the transport template.  The presence of this function will
a53eb5e06   James Smart   [SCSI] FC Transpo...
270
271
272
273
274
275
276
277
278
279
280
281
282
    cause the creation of the new attributes on the fc_host.  As part of
    the physical port completing its initialization relative to the
    transport, it should set the max_npiv_vports attribute to indicate the
    maximum number of vports the driver and/or adapter supports.
  
  
  Vport Creation:
  
    The LLDD vport_create() syntax is:
  
        int vport_create(struct fc_vport *vport, bool disable)
  
      where:
9ef3e4a45   James Smart   [SCSI] fc_transpo...
283
284
285
        vport:    Is the newly allocated vport object
        disable:  If "true", the vport is to be created in a disabled stated.
                  If "false", the vport is to be enabled upon creation.
a53eb5e06   James Smart   [SCSI] FC Transpo...
286
287
288
289
290
291
292
293
294
295
296
297
298
299
  
    When a request is made to create a new vport (via sgio/netlink, or the
    vport_create fc_host attribute), the transport will validate that the LLDD
    can support another vport (e.g. max_npiv_vports > npiv_vports_inuse).
    If not, the create request will be failed.  If space remains, the transport
    will increment the vport count, create the vport object, and then call the
    LLDD's vport_create() function with the newly allocated vport object.
  
    As mentioned above, vport creation is divided into two parts:
      - Creation with the kernel and LLDD. This means all transport and
        driver data structures are built up, and device objects created.
        This is equivalent to a driver "attach" on an adapter, which is
        independent of the adapter's link state.
      - Instantiation of the vport on the FC link via ELS traffic, etc.
73ac36ea1   Coly Li   fix similar typos...
300
        This is equivalent to a "link up" and successful link initialization.
a53eb5e06   James Smart   [SCSI] FC Transpo...
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
  
    The LLDD's vport_create() function will not synchronously wait for both
    parts to be fully completed before returning. It must validate that the
    infrastructure exists to support NPIV, and complete the first part of
    vport creation (data structure build up) before returning.  We do not
    hinge vport_create() on the link-side operation mainly because:
      - The link may be down. It is not a failure if it is. It simply
        means the vport is in an inoperable state until the link comes up.
        This is consistent with the link bouncing post vport creation.
      - The vport may be created in a disabled state.
      - This is consistent with a model where:  the vport equates to a
        FC adapter. The vport_create is synonymous with driver attachment
        to the adapter, which is independent of link state.
  
      Note: special error codes have been defined to delineate infrastructure
        failure cases for quicker resolution.
  
    The expected behavior for the LLDD's vport_create() function is:
      - Validate Infrastructure:
          - If the driver or adapter cannot support another vport, whether
              due to improper firmware, (a lie about) max_npiv, or a lack of
9ef3e4a45   James Smart   [SCSI] fc_transpo...
322
              some other resource - return VPCERR_UNSUPPORTED.
a53eb5e06   James Smart   [SCSI] FC Transpo...
323
324
325
326
327
328
329
330
          - If the driver validates the WWN's against those already active on
              the adapter and detects an overlap - return VPCERR_BAD_WWN.
          - If the driver detects the topology is loop, non-fabric, or the
              FLOGI did not support NPIV - return VPCERR_NO_FABRIC_SUPP.
      - Allocate data structures. If errors are encountered, such as out
          of memory conditions, return the respective negative Exxx error code.
      - If the role is FCP Initiator, the LLDD is to :
          - Call scsi_host_alloc() to allocate a scsi_host for the vport.
9ef3e4a45   James Smart   [SCSI] fc_transpo...
331
332
333
          - Call scsi_add_host(new_shost, &vport->dev) to start the scsi_host
            and bind it as a child of the vport device.
          - Initializes the fc_host attribute values.
a53eb5e06   James Smart   [SCSI] FC Transpo...
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
      - Kick of further vport state transitions based on the disable flag and
          link state - and return success (zero).
  
    LLDD Implementers Notes:
    - It is suggested that there be a different fc_function_templates for
      the physical port and the virtual port.  The physical port's template
      would have the vport_create, vport_delete, and vport_disable functions,
      while the vports would not.
    - It is suggested that there be different scsi_host_templates
      for the physical port and virtual port. Likely, there are driver
      attributes, embedded into the scsi_host_template, that are applicable
      for the physical port only (link speed, topology setting, etc). This
      ensures that the attributes are applicable to the respective scsi_host.
  
  
  Vport Disable/Enable:
  
    The LLDD vport_disable() syntax is:
  
        int vport_disable(struct fc_vport *vport, bool disable)
  
      where:
fd589a8f0   Anand Gadiyar   trivial: fix typo...
356
        vport:    Is vport to be enabled or disabled
9ef3e4a45   James Smart   [SCSI] fc_transpo...
357
358
        disable:  If "true", the vport is to be disabled.
                  If "false", the vport is to be enabled.
a53eb5e06   James Smart   [SCSI] FC Transpo...
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
  
    When a request is made to change the disabled state on a vport, the
    transport will validate the request against the existing vport state.
    If the request is to disable and the vport is already disabled, the
    request will fail. Similarly, if the request is to enable, and the
    vport is not in a disabled state, the request will fail.  If the request
    is valid for the vport state, the transport will call the LLDD to
    change the vport's state.
  
    Within the LLDD, if a vport is disabled, it remains instantiated with
    the kernel and LLDD, but it is not active or visible on the FC link in
    any way. (see Vport Creation and the 2 part instantiation discussion).
    The vport will remain in this state until it is deleted or re-enabled.
    When enabling a vport, the LLDD reinstantiates the vport on the FC
    link - essentially restarting the LLDD statemachine (see Vport States
    above).
  
  
  Vport Deletion:
  
    The LLDD vport_delete() syntax is:
  
        int vport_delete(struct fc_vport *vport)
  
      where:
9ef3e4a45   James Smart   [SCSI] fc_transpo...
384
        vport:    Is vport to delete
a53eb5e06   James Smart   [SCSI] FC Transpo...
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
  
    When a request is made to delete a vport (via sgio/netlink, or via the
    fc_host or fc_vport vport_delete attributes), the transport will call
    the LLDD to terminate the vport on the FC link, and teardown all other
    datastructures and references.  If the LLDD completes successfully,
    the transport will teardown the vport objects and complete the vport
    removal.  If the LLDD delete request fails, the vport object will remain,
    but will be in an indeterminate state.
  
    Within the LLDD, the normal code paths for a scsi_host teardown should
    be followed. E.g. If the vport has a FCP Initiator role, the LLDD
    will call fc_remove_host() for the vports scsi_host, followed by
    scsi_remove_host() and scsi_host_put() for the vports scsi_host.
  
  
  Other:
    fc_host port_type attribute:
      There is a new fc_host port_type value - FC_PORTTYPE_NPIV. This value
      must be set on all vport-based fc_hosts.  Normally, on a physical port,
      the port_type attribute would be set to NPORT, NLPORT, etc based on the
      topology type and existence of the fabric. As this is not applicable to
      a vport, it makes more sense to report the FC mechanism used to create
      the vport.
  
    Driver unload:
      FC drivers are required to call fc_remove_host() prior to calling
      scsi_remove_host().  This allows the fc_host to tear down all remote
      ports prior the scsi_host being torn down.  The fc_remove_host() call
      was updated to remove all vports for the fc_host as well.
a30c3f69e   Andrew Vasquez   [SCSI] fc_transpo...
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
  Transport supplied functions
  ----------------------------
  
  The following functions are supplied by the FC-transport for use by LLDs.
  
     fc_vport_create - create a vport
     fc_vport_terminate - detach and remove a vport
  
  Details:
  
  /**
   * fc_vport_create - Admin App or LLDD requests creation of a vport
   * @shost:     scsi host the virtual port is connected to.
   * @ids:       The world wide names, FC4 port roles, etc for
   *              the virtual port.
   *
   * Notes:
   *     This routine assumes no locks are held on entry.
   */
  struct fc_vport *
  fc_vport_create(struct Scsi_Host *shost, struct fc_vport_identifiers *ids)
  
  /**
   * fc_vport_terminate - Admin App or LLDD requests termination of a vport
   * @vport:      fc_vport to be terminated
   *
   * Calls the LLDD vport_delete() function, then deallocates and removes
   * the vport from the shost and object tree.
   *
   * Notes:
   *      This routine assumes no locks are held on entry.
   */
  int
  fc_vport_terminate(struct fc_vport *vport)
9e4f5e296   James Smart   [SCSI] FC Pass Th...
448
449
450
  FC BSG support (CT & ELS passthru, and more)
  ========================================================================
  << To Be Supplied >>
a53eb5e06   James Smart   [SCSI] FC Transpo...
451
452
453
454
455
456
457
458
459
460
461
  Credits
  =======
  The following people have contributed to this document:
  
  
  
  
  
  
  James Smart
  james.smart@emulex.com