diff options
author | Maxim Shchetynin <maxim@de.ibm.com> | 2005-09-13 15:51:16 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-09-19 14:03:45 -0400 |
commit | aef4a983090fa590481a86d9690dc3fa6bb121fa (patch) | |
tree | 12b78b227102dc2f41dda227fe83f34a8838e015 /drivers/s390/scsi/zfcp_fsf.h | |
parent | 8a36e4532ea10471f0a8605207d071361d7be2c3 (diff) |
[SCSI] zfcp: provide support for NPIV
N_Port ID Virtualization (NPIV) allows a single FCP port to appear as
multiple, distinct ports providing separate port identification. NPIV
is supported by FC HBAs on System z9. zfcp was adapted to support this
new feature.
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.h')
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.h | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.h b/drivers/s390/scsi/zfcp_fsf.h index 57ce0706007e..48719f055952 100644 --- a/drivers/s390/scsi/zfcp_fsf.h +++ b/drivers/s390/scsi/zfcp_fsf.h | |||
@@ -140,9 +140,18 @@ | |||
140 | #define FSF_SQ_CFDC_SUBTABLE_LUN 0x0004 | 140 | #define FSF_SQ_CFDC_SUBTABLE_LUN 0x0004 |
141 | 141 | ||
142 | /* FSF status qualifier (most significant 4 bytes), local link down */ | 142 | /* FSF status qualifier (most significant 4 bytes), local link down */ |
143 | #define FSF_PSQ_LINK_NOLIGHT 0x00000004 | 143 | #define FSF_PSQ_LINK_NO_LIGHT 0x00000004 |
144 | #define FSF_PSQ_LINK_WRAPPLUG 0x00000008 | 144 | #define FSF_PSQ_LINK_WRAP_PLUG 0x00000008 |
145 | #define FSF_PSQ_LINK_NOFCP 0x00000010 | 145 | #define FSF_PSQ_LINK_NO_FCP 0x00000010 |
146 | #define FSF_PSQ_LINK_FIRMWARE_UPDATE 0x00000020 | ||
147 | #define FSF_PSQ_LINK_INVALID_WWPN 0x00000100 | ||
148 | #define FSF_PSQ_LINK_NO_NPIV_SUPPORT 0x00000200 | ||
149 | #define FSF_PSQ_LINK_NO_FCP_RESOURCES 0x00000400 | ||
150 | #define FSF_PSQ_LINK_NO_FABRIC_RESOURCES 0x00000800 | ||
151 | #define FSF_PSQ_LINK_FABRIC_LOGIN_UNABLE 0x00001000 | ||
152 | #define FSF_PSQ_LINK_WWPN_ASSIGNMENT_CORRUPTED 0x00002000 | ||
153 | #define FSF_PSQ_LINK_MODE_TABLE_CURRUPTED 0x00004000 | ||
154 | #define FSF_PSQ_LINK_NO_WWPN_ASSIGNMENT 0x00008000 | ||
146 | 155 | ||
147 | /* payload size in status read buffer */ | 156 | /* payload size in status read buffer */ |
148 | #define FSF_STATUS_READ_PAYLOAD_SIZE 4032 | 157 | #define FSF_STATUS_READ_PAYLOAD_SIZE 4032 |
@@ -155,15 +164,21 @@ | |||
155 | #define FSF_STATUS_READ_INCOMING_ELS 0x00000002 | 164 | #define FSF_STATUS_READ_INCOMING_ELS 0x00000002 |
156 | #define FSF_STATUS_READ_SENSE_DATA_AVAIL 0x00000003 | 165 | #define FSF_STATUS_READ_SENSE_DATA_AVAIL 0x00000003 |
157 | #define FSF_STATUS_READ_BIT_ERROR_THRESHOLD 0x00000004 | 166 | #define FSF_STATUS_READ_BIT_ERROR_THRESHOLD 0x00000004 |
158 | #define FSF_STATUS_READ_LINK_DOWN 0x00000005 /* FIXME: really? */ | 167 | #define FSF_STATUS_READ_LINK_DOWN 0x00000005 |
159 | #define FSF_STATUS_READ_LINK_UP 0x00000006 | 168 | #define FSF_STATUS_READ_LINK_UP 0x00000006 |
160 | #define FSF_STATUS_READ_CFDC_UPDATED 0x0000000A | 169 | #define FSF_STATUS_READ_CFDC_UPDATED 0x0000000A |
161 | #define FSF_STATUS_READ_CFDC_HARDENED 0x0000000B | 170 | #define FSF_STATUS_READ_CFDC_HARDENED 0x0000000B |
171 | #define FSF_STATUS_READ_FEATURE_UPDATE_ALERT 0x0000000C | ||
162 | 172 | ||
163 | /* status subtypes in status read buffer */ | 173 | /* status subtypes in status read buffer */ |
164 | #define FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT 0x00000001 | 174 | #define FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT 0x00000001 |
165 | #define FSF_STATUS_READ_SUB_ERROR_PORT 0x00000002 | 175 | #define FSF_STATUS_READ_SUB_ERROR_PORT 0x00000002 |
166 | 176 | ||
177 | /* status subtypes for link down */ | ||
178 | #define FSF_STATUS_READ_SUB_NO_PHYSICAL_LINK 0x00000000 | ||
179 | #define FSF_STATUS_READ_SUB_FDISC_FAILED 0x00000001 | ||
180 | #define FSF_STATUS_READ_SUB_FIRMWARE_UPDATE 0x00000002 | ||
181 | |||
167 | /* status subtypes for CFDC */ | 182 | /* status subtypes for CFDC */ |
168 | #define FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE 0x00000002 | 183 | #define FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE 0x00000002 |
169 | #define FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE2 0x0000000F | 184 | #define FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE2 0x0000000F |
@@ -194,11 +209,15 @@ | |||
194 | #define FSF_QTCB_LOG_SIZE 1024 | 209 | #define FSF_QTCB_LOG_SIZE 1024 |
195 | 210 | ||
196 | /* channel features */ | 211 | /* channel features */ |
197 | #define FSF_FEATURE_QTCB_SUPPRESSION 0x00000001 | ||
198 | #define FSF_FEATURE_CFDC 0x00000002 | 212 | #define FSF_FEATURE_CFDC 0x00000002 |
199 | #define FSF_FEATURE_LUN_SHARING 0x00000004 | 213 | #define FSF_FEATURE_LUN_SHARING 0x00000004 |
200 | #define FSF_FEATURE_HBAAPI_MANAGEMENT 0x00000010 | 214 | #define FSF_FEATURE_HBAAPI_MANAGEMENT 0x00000010 |
201 | #define FSF_FEATURE_ELS_CT_CHAINED_SBALS 0x00000020 | 215 | #define FSF_FEATURE_ELS_CT_CHAINED_SBALS 0x00000020 |
216 | #define FSF_FEATURE_UPDATE_ALERT 0x00000100 | ||
217 | |||
218 | /* host connection features */ | ||
219 | #define FSF_FEATURE_NPIV_MODE 0x00000001 | ||
220 | #define FSF_FEATURE_VM_ASSIGNED_WWPN 0x00000002 | ||
202 | 221 | ||
203 | /* option */ | 222 | /* option */ |
204 | #define FSF_OPEN_LUN_SUPPRESS_BOXING 0x00000001 | 223 | #define FSF_OPEN_LUN_SUPPRESS_BOXING 0x00000001 |
@@ -306,16 +325,23 @@ struct fsf_qual_sequence_error { | |||
306 | u32 res1[3]; | 325 | u32 res1[3]; |
307 | } __attribute__ ((packed)); | 326 | } __attribute__ ((packed)); |
308 | 327 | ||
309 | struct fsf_qual_locallink_error { | 328 | struct fsf_link_down_info { |
310 | u32 code; | 329 | u32 error_code; |
311 | u32 res1[3]; | 330 | u32 res1; |
331 | u8 res2[2]; | ||
332 | u8 primary_status; | ||
333 | u8 ioerr_code; | ||
334 | u8 action_code; | ||
335 | u8 reason_code; | ||
336 | u8 explanation_code; | ||
337 | u8 vendor_specific_code; | ||
312 | } __attribute__ ((packed)); | 338 | } __attribute__ ((packed)); |
313 | 339 | ||
314 | union fsf_prot_status_qual { | 340 | union fsf_prot_status_qual { |
315 | u64 doubleword[FSF_PROT_STATUS_QUAL_SIZE / sizeof(u64)]; | 341 | u64 doubleword[FSF_PROT_STATUS_QUAL_SIZE / sizeof(u64)]; |
316 | struct fsf_qual_version_error version_error; | 342 | struct fsf_qual_version_error version_error; |
317 | struct fsf_qual_sequence_error sequence_error; | 343 | struct fsf_qual_sequence_error sequence_error; |
318 | struct fsf_qual_locallink_error locallink_error; | 344 | struct fsf_link_down_info link_down_info; |
319 | } __attribute__ ((packed)); | 345 | } __attribute__ ((packed)); |
320 | 346 | ||
321 | struct fsf_qtcb_prefix { | 347 | struct fsf_qtcb_prefix { |
@@ -335,6 +361,7 @@ union fsf_status_qual { | |||
335 | u32 word[FSF_STATUS_QUALIFIER_SIZE / sizeof (u32)]; | 361 | u32 word[FSF_STATUS_QUALIFIER_SIZE / sizeof (u32)]; |
336 | u64 doubleword[FSF_STATUS_QUALIFIER_SIZE / sizeof(u64)]; | 362 | u64 doubleword[FSF_STATUS_QUALIFIER_SIZE / sizeof(u64)]; |
337 | struct fsf_queue_designator fsf_queue_designator; | 363 | struct fsf_queue_designator fsf_queue_designator; |
364 | struct fsf_link_down_info link_down_info; | ||
338 | } __attribute__ ((packed)); | 365 | } __attribute__ ((packed)); |
339 | 366 | ||
340 | struct fsf_qtcb_header { | 367 | struct fsf_qtcb_header { |
@@ -409,8 +436,8 @@ struct fsf_qtcb_bottom_config { | |||
409 | u32 low_qtcb_version; | 436 | u32 low_qtcb_version; |
410 | u32 max_qtcb_size; | 437 | u32 max_qtcb_size; |
411 | u32 max_data_transfer_size; | 438 | u32 max_data_transfer_size; |
412 | u32 supported_features; | 439 | u32 adapter_features; |
413 | u8 res1[4]; | 440 | u32 connection_features; |
414 | u32 fc_topology; | 441 | u32 fc_topology; |
415 | u32 fc_link_speed; | 442 | u32 fc_link_speed; |
416 | u32 adapter_type; | 443 | u32 adapter_type; |
@@ -428,7 +455,7 @@ struct fsf_qtcb_bottom_config { | |||
428 | } __attribute__ ((packed)); | 455 | } __attribute__ ((packed)); |
429 | 456 | ||
430 | struct fsf_qtcb_bottom_port { | 457 | struct fsf_qtcb_bottom_port { |
431 | u8 res1[8]; | 458 | u64 wwpn; |
432 | u32 fc_port_id; | 459 | u32 fc_port_id; |
433 | u32 port_type; | 460 | u32 port_type; |
434 | u32 port_state; | 461 | u32 port_state; |