aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/scsi
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-05-24 19:04:44 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-26 12:47:58 -0400
commit9ef3e4a4527e1f65b8776287c6d4fd1fca5ba98f (patch)
tree21352d4d676ada59ec83aa39963ddf0423ff6a72 /Documentation/scsi
parentbee4fe8e63ea1985f3955323dbc98b6d6bd5c6f8 (diff)
[SCSI] fc_transport: fix sysfs deadlock on vport delete
When the vport attribute "delete" is used to delete the vport, sysfs deadlocks waiting for the write to complete, which is waiting for the sysfs teardown to complete. Moved this effort to a work_q element. Took the opportunity to make some other cosmetic changes: - removed tabs in Doc file - replaced with expanded spaces - minor copyright text and author text updates - removed a bunch of trailing whitespace Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'Documentation/scsi')
-rw-r--r--Documentation/scsi/scsi_fc_transport.txt126
1 files changed, 63 insertions, 63 deletions
diff --git a/Documentation/scsi/scsi_fc_transport.txt b/Documentation/scsi/scsi_fc_transport.txt
index ab057afc757f..d403e46d8463 100644
--- a/Documentation/scsi/scsi_fc_transport.txt
+++ b/Documentation/scsi/scsi_fc_transport.txt
@@ -119,67 +119,67 @@ Vport Attributes:
119 119
120 The new fc_vport class object has the following attributes 120 The new fc_vport class object has the following attributes
121 121
122 node_name: Read_Only 122 node_name: Read_Only
123 The WWNN of the vport 123 The WWNN of the vport
124 124
125 port_name: Read_Only 125 port_name: Read_Only
126 The WWPN of the vport 126 The WWPN of the vport
127 127
128 roles: Read_Only 128 roles: Read_Only
129 Indicates the FC4 roles enabled on the vport. 129 Indicates the FC4 roles enabled on the vport.
130 130
131 symbolic_name: Read_Write 131 symbolic_name: Read_Write
132 A string, appended to the driver's symbolic port name string, which 132 A string, appended to the driver's symbolic port name string, which
133 is registered with the switch to identify the vport. For example, 133 is registered with the switch to identify the vport. For example,
134 a hypervisor could set this string to "Xen Domain 2 VM 5 Vport 2", 134 a hypervisor could set this string to "Xen Domain 2 VM 5 Vport 2",
135 and this set of identifiers can be seen on switch management screens 135 and this set of identifiers can be seen on switch management screens
136 to identify the port. 136 to identify the port.
137 137
138 vport_delete: Write_Only 138 vport_delete: Write_Only
139 When written with a "1", will tear down the vport. 139 When written with a "1", will tear down the vport.
140 140
141 vport_disable: Write_Only 141 vport_disable: Write_Only
142 When written with a "1", will transition the vport to a disabled. 142 When written with a "1", will transition the vport to a disabled.
143 state. The vport will still be instantiated with the Linux kernel, 143 state. The vport will still be instantiated with the Linux kernel,
144 but it will not be active on the FC link. 144 but it will not be active on the FC link.
145 When written with a "0", will enable the vport. 145 When written with a "0", will enable the vport.
146 146
147 vport_last_state: Read_Only 147 vport_last_state: Read_Only
148 Indicates the previous state of the vport. See the section below on 148 Indicates the previous state of the vport. See the section below on
149 "Vport States". 149 "Vport States".
150 150
151 vport_state: Read_Only 151 vport_state: Read_Only
152 Indicates the state of the vport. See the section below on 152 Indicates the state of the vport. See the section below on
153 "Vport States". 153 "Vport States".
154 154
155 vport_type: Read_Only 155 vport_type: Read_Only
156 Reflects the FC mechanism used to create the virtual port. 156 Reflects the FC mechanism used to create the virtual port.
157 Only NPIV is supported currently. 157 Only NPIV is supported currently.
158 158
159 159
160 For the fc_host class object, the following attributes are added for vports: 160 For the fc_host class object, the following attributes are added for vports:
161 161
162 max_npiv_vports: Read_Only 162 max_npiv_vports: Read_Only
163 Indicates the maximum number of NPIV-based vports that the 163 Indicates the maximum number of NPIV-based vports that the
164 driver/adapter can support on the fc_host. 164 driver/adapter can support on the fc_host.
165 165
166 npiv_vports_inuse: Read_Only 166 npiv_vports_inuse: Read_Only
167 Indicates how many NPIV-based vports have been instantiated on the 167 Indicates how many NPIV-based vports have been instantiated on the
168 fc_host. 168 fc_host.
169 169
170 vport_create: Write_Only 170 vport_create: Write_Only
171 A "simple" create interface to instantiate a vport on an fc_host. 171 A "simple" create interface to instantiate a vport on an fc_host.
172 A "<WWPN>:<WWNN>" string is written to the attribute. The transport 172 A "<WWPN>:<WWNN>" string is written to the attribute. The transport
173 then instantiates the vport object and calls the LLDD to create the 173 then instantiates the vport object and calls the LLDD to create the
174 vport with the role of FCP_Initiator. Each WWN is specified as 16 174 vport with the role of FCP_Initiator. Each WWN is specified as 16
175 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc). 175 hex characters and may *not* contain any prefixes (e.g. 0x, x, etc).
176 176
177 vport_delete: Write_Only 177 vport_delete: Write_Only
178 A "simple" delete interface to teardown a vport. A "<WWPN>:<WWNN>" 178 A "simple" delete interface to teardown a vport. A "<WWPN>:<WWNN>"
179 string is written to the attribute. The transport will locate the 179 string is written to the attribute. The transport will locate the
180 vport on the fc_host with the same WWNs and tear it down. Each WWN 180 vport on the fc_host with the same WWNs and tear it down. Each WWN
181 is specified as 16 hex characters and may *not* contain any prefixes 181 is specified as 16 hex characters and may *not* contain any prefixes
182 (e.g. 0x, x, etc). 182 (e.g. 0x, x, etc).
183 183
184 184
185Vport States: 185Vport States:
@@ -198,23 +198,23 @@ Vport States:
198 Once a vport has been instantiated with the kernel/LLDD, a vport state 198 Once a vport has been instantiated with the kernel/LLDD, a vport state
199 can be reported via the sysfs attribute. The following states exist: 199 can be reported via the sysfs attribute. The following states exist:
200 200
201 FC_VPORT_UNKNOWN - Unknown 201 FC_VPORT_UNKNOWN - Unknown
202 An temporary state, typically set only while the vport is being 202 An temporary state, typically set only while the vport is being
203 instantiated with the kernel and LLDD. 203 instantiated with the kernel and LLDD.
204 204
205 FC_VPORT_ACTIVE - Active 205 FC_VPORT_ACTIVE - Active
206 The vport has been successfully been created on the FC link. 206 The vport has been successfully been created on the FC link.
207 It is fully functional. 207 It is fully functional.
208 208
209 FC_VPORT_DISABLED - Disabled 209 FC_VPORT_DISABLED - Disabled
210 The vport instantiated, but "disabled". The vport is not instantiated 210 The vport instantiated, but "disabled". The vport is not instantiated
211 on the FC link. This is equivalent to a physical port with the 211 on the FC link. This is equivalent to a physical port with the
212 link "down". 212 link "down".
213 213
214 FC_VPORT_LINKDOWN - Linkdown 214 FC_VPORT_LINKDOWN - Linkdown
215 The vport is not operational as the physical link is not operational. 215 The vport is not operational as the physical link is not operational.
216 216
217 FC_VPORT_INITIALIZING - Initializing 217 FC_VPORT_INITIALIZING - Initializing
218 The vport is in the process of instantiating on the FC link. 218 The vport is in the process of instantiating on the FC link.
219 The LLDD will set this state just prior to starting the ELS traffic 219 The LLDD will set this state just prior to starting the ELS traffic
220 to create the vport. This state will persist until the vport is 220 to create the vport. This state will persist until the vport is
@@ -222,65 +222,65 @@ Vport States:
222 (state is one of the values below). As this state is transitory, 222 (state is one of the values below). As this state is transitory,
223 it will not be preserved in the "vport_last_state". 223 it will not be preserved in the "vport_last_state".
224 224
225 FC_VPORT_NO_FABRIC_SUPP - No Fabric Support 225 FC_VPORT_NO_FABRIC_SUPP - No Fabric Support
226 The vport is not operational. One of the following conditions were 226 The vport is not operational. One of the following conditions were
227 encountered: 227 encountered:
228 - The FC topology is not Point-to-Point 228 - The FC topology is not Point-to-Point
229 - The FC port is not connected to an F_Port 229 - The FC port is not connected to an F_Port
230 - The F_Port has indicated that NPIV is not supported. 230 - The F_Port has indicated that NPIV is not supported.
231 231
232 FC_VPORT_NO_FABRIC_RSCS - No Fabric Resources 232 FC_VPORT_NO_FABRIC_RSCS - No Fabric Resources
233 The vport is not operational. The Fabric failed FDISC with a status 233 The vport is not operational. The Fabric failed FDISC with a status
234 indicating that it does not have sufficient resources to complete 234 indicating that it does not have sufficient resources to complete
235 the operation. 235 the operation.
236 236
237 FC_VPORT_FABRIC_LOGOUT - Fabric Logout 237 FC_VPORT_FABRIC_LOGOUT - Fabric Logout
238 The vport is not operational. The Fabric has LOGO'd the N_Port_ID 238 The vport is not operational. The Fabric has LOGO'd the N_Port_ID
239 associated with the vport. 239 associated with the vport.
240 240
241 FC_VPORT_FABRIC_REJ_WWN - Fabric Rejected WWN 241 FC_VPORT_FABRIC_REJ_WWN - Fabric Rejected WWN
242 The vport is not operational. The Fabric failed FDISC with a status 242 The vport is not operational. The Fabric failed FDISC with a status
243 indicating that the WWN's are not valid. 243 indicating that the WWN's are not valid.
244 244
245 FC_VPORT_FAILED - VPort Failed 245 FC_VPORT_FAILED - VPort Failed
246 The vport is not operational. This is a catchall for all other 246 The vport is not operational. This is a catchall for all other
247 error conditions. 247 error conditions.
248 248
249 249
250 The following state table indicates the different state transitions: 250 The following state table indicates the different state transitions:
251 251
252 State Event New State 252 State Event New State
253 -------------------------------------------------------------------- 253 --------------------------------------------------------------------
254 n/a Initialization Unknown 254 n/a Initialization Unknown
255 Unknown: Link Down Linkdown 255 Unknown: Link Down Linkdown
256 Link Up & Loop No Fabric Support 256 Link Up & Loop No Fabric Support
257 Link Up & no Fabric No Fabric Support 257 Link Up & no Fabric No Fabric Support
258 Link Up & FLOGI response No Fabric Support 258 Link Up & FLOGI response No Fabric Support
259 indicates no NPIV support 259 indicates no NPIV support
260 Link Up & FDISC being sent Initializing 260 Link Up & FDISC being sent Initializing
261 Disable request Disable 261 Disable request Disable
262 Linkdown: Link Up Unknown 262 Linkdown: Link Up Unknown
263 Initializing: FDISC ACC Active 263 Initializing: FDISC ACC Active
264 FDISC LS_RJT w/ no resources No Fabric Resources 264 FDISC LS_RJT w/ no resources No Fabric Resources
265 FDISC LS_RJT w/ invalid Fabric Rejected WWN 265 FDISC LS_RJT w/ invalid Fabric Rejected WWN
266 pname or invalid nport_id 266 pname or invalid nport_id
267 FDISC LS_RJT failed for Vport Failed 267 FDISC LS_RJT failed for Vport Failed
268 other reasons 268 other reasons
269 Link Down Linkdown 269 Link Down Linkdown
270 Disable request Disable 270 Disable request Disable
271 Disable: Enable request Unknown 271 Disable: Enable request Unknown
272 Active: LOGO received from fabric Fabric Logout 272 Active: LOGO received from fabric Fabric Logout
273 Link Down Linkdown 273 Link Down Linkdown
274 Disable request Disable 274 Disable request Disable
275 Fabric Logout: Link still up Unknown 275 Fabric Logout: Link still up Unknown
276 276
277 The following 4 error states all have the same transitions: 277 The following 4 error states all have the same transitions:
278 No Fabric Support: 278 No Fabric Support:
279 No Fabric Resources: 279 No Fabric Resources:
280 Fabric Rejected WWN: 280 Fabric Rejected WWN:
281 Vport Failed: 281 Vport Failed:
282 Disable request Disable 282 Disable request Disable
283 Link goes down Linkdown 283 Link goes down Linkdown
284 284
285 285
286Transport <-> LLDD Interfaces : 286Transport <-> LLDD Interfaces :
@@ -303,9 +303,9 @@ Vport Creation:
303 int vport_create(struct fc_vport *vport, bool disable) 303 int vport_create(struct fc_vport *vport, bool disable)
304 304
305 where: 305 where:
306 vport: Is the newly allocated vport object 306 vport: Is the newly allocated vport object
307 disable: If "true", the vport is to be created in a disabled stated. 307 disable: If "true", the vport is to be created in a disabled stated.
308 If "false", the vport is to be enabled upon creation. 308 If "false", the vport is to be enabled upon creation.
309 309
310 When a request is made to create a new vport (via sgio/netlink, or the 310 When a request is made to create a new vport (via sgio/netlink, or the
311 vport_create fc_host attribute), the transport will validate that the LLDD 311 vport_create fc_host attribute), the transport will validate that the LLDD
@@ -342,7 +342,7 @@ Vport Creation:
342 - Validate Infrastructure: 342 - Validate Infrastructure:
343 - If the driver or adapter cannot support another vport, whether 343 - If the driver or adapter cannot support another vport, whether
344 due to improper firmware, (a lie about) max_npiv, or a lack of 344 due to improper firmware, (a lie about) max_npiv, or a lack of
345 some other resource - return VPCERR_UNSUPPORTED. 345 some other resource - return VPCERR_UNSUPPORTED.
346 - If the driver validates the WWN's against those already active on 346 - If the driver validates the WWN's against those already active on
347 the adapter and detects an overlap - return VPCERR_BAD_WWN. 347 the adapter and detects an overlap - return VPCERR_BAD_WWN.
348 - If the driver detects the topology is loop, non-fabric, or the 348 - If the driver detects the topology is loop, non-fabric, or the
@@ -351,9 +351,9 @@ Vport Creation:
351 of memory conditions, return the respective negative Exxx error code. 351 of memory conditions, return the respective negative Exxx error code.
352 - If the role is FCP Initiator, the LLDD is to : 352 - If the role is FCP Initiator, the LLDD is to :
353 - Call scsi_host_alloc() to allocate a scsi_host for the vport. 353 - Call scsi_host_alloc() to allocate a scsi_host for the vport.
354 - Call scsi_add_host(new_shost, &vport->dev) to start the scsi_host 354 - Call scsi_add_host(new_shost, &vport->dev) to start the scsi_host
355 and bind it as a child of the vport device. 355 and bind it as a child of the vport device.
356 - Initializes the fc_host attribute values. 356 - Initializes the fc_host attribute values.
357 - Kick of further vport state transitions based on the disable flag and 357 - Kick of further vport state transitions based on the disable flag and
358 link state - and return success (zero). 358 link state - and return success (zero).
359 359
@@ -376,9 +376,9 @@ Vport Disable/Enable:
376 int vport_disable(struct fc_vport *vport, bool disable) 376 int vport_disable(struct fc_vport *vport, bool disable)
377 377
378 where: 378 where:
379 vport: Is vport to to be enabled or disabled 379 vport: Is vport to to be enabled or disabled
380 disable: If "true", the vport is to be disabled. 380 disable: If "true", the vport is to be disabled.
381 If "false", the vport is to be enabled. 381 If "false", the vport is to be enabled.
382 382
383 When a request is made to change the disabled state on a vport, the 383 When a request is made to change the disabled state on a vport, the
384 transport will validate the request against the existing vport state. 384 transport will validate the request against the existing vport state.
@@ -404,7 +404,7 @@ Vport Deletion:
404 int vport_delete(struct fc_vport *vport) 404 int vport_delete(struct fc_vport *vport)
405 405
406 where: 406 where:
407 vport: Is vport to delete 407 vport: Is vport to delete
408 408
409 When a request is made to delete a vport (via sgio/netlink, or via the 409 When a request is made to delete a vport (via sgio/netlink, or via the
410 fc_host or fc_vport vport_delete attributes), the transport will call 410 fc_host or fc_vport vport_delete attributes), the transport will call