| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * ibmvfc.h -- driver for IBM Power Virtual Fibre Channel Adapter |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Written By: Brian King <brking@linux.vnet.ibm.com>, IBM Corporation |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright (C) IBM Corporation, 2008 |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 10 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 11 | | - * (at your option) any later version. |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 16 | | - * GNU General Public License for more details. |
|---|
| 17 | | - * |
|---|
| 18 | | - * You should have received a copy of the GNU General Public License |
|---|
| 19 | | - * along with this program; if not, write to the Free Software |
|---|
| 20 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 21 | | - * |
|---|
| 22 | 8 | */ |
|---|
| 23 | 9 | |
|---|
| 24 | 10 | #ifndef _IBMVFC_H |
|---|
| .. | .. |
|---|
| 78 | 64 | IBMVFC_CRQ_XPORT_EVENT = 0xFF, |
|---|
| 79 | 65 | }; |
|---|
| 80 | 66 | |
|---|
| 81 | | -enum ibmvfc_crq_format { |
|---|
| 67 | +enum ibmvfc_crq_init_msg { |
|---|
| 82 | 68 | IBMVFC_CRQ_INIT = 0x01, |
|---|
| 83 | 69 | IBMVFC_CRQ_INIT_COMPLETE = 0x02, |
|---|
| 70 | +}; |
|---|
| 71 | + |
|---|
| 72 | +enum ibmvfc_crq_xport_evts { |
|---|
| 73 | + IBMVFC_PARTNER_FAILED = 0x01, |
|---|
| 74 | + IBMVFC_PARTNER_DEREGISTER = 0x02, |
|---|
| 84 | 75 | IBMVFC_PARTITION_MIGRATED = 0x06, |
|---|
| 85 | 76 | }; |
|---|
| 86 | 77 | |
|---|
| .. | .. |
|---|
| 129 | 120 | IBMVFC_PORT_LOGIN = 0x0004, |
|---|
| 130 | 121 | IBMVFC_PROCESS_LOGIN = 0x0008, |
|---|
| 131 | 122 | IBMVFC_QUERY_TARGET = 0x0010, |
|---|
| 123 | + IBMVFC_MOVE_LOGIN = 0x0020, |
|---|
| 132 | 124 | IBMVFC_IMPLICIT_LOGOUT = 0x0040, |
|---|
| 133 | 125 | IBMVFC_PASSTHRU = 0x0200, |
|---|
| 134 | 126 | IBMVFC_TMF_MAD = 0x0100, |
|---|
| 135 | 127 | IBMVFC_NPIV_LOGOUT = 0x0800, |
|---|
| 128 | + IBMVFC_CHANNEL_ENQUIRY = 0x1000, |
|---|
| 129 | + IBMVFC_CHANNEL_SETUP = 0x2000, |
|---|
| 130 | + IBMVFC_CONNECTION_INFO = 0x4000, |
|---|
| 136 | 131 | }; |
|---|
| 137 | 132 | |
|---|
| 138 | 133 | struct ibmvfc_mad_common { |
|---|
| .. | .. |
|---|
| 142 | 137 | __be16 status; |
|---|
| 143 | 138 | __be16 length; |
|---|
| 144 | 139 | __be64 tag; |
|---|
| 145 | | -}__attribute__((packed, aligned (8))); |
|---|
| 140 | +} __packed __aligned(8); |
|---|
| 146 | 141 | |
|---|
| 147 | 142 | struct ibmvfc_npiv_login_mad { |
|---|
| 148 | 143 | struct ibmvfc_mad_common common; |
|---|
| 149 | 144 | struct srp_direct_buf buffer; |
|---|
| 150 | | -}__attribute__((packed, aligned (8))); |
|---|
| 145 | +} __packed __aligned(8); |
|---|
| 151 | 146 | |
|---|
| 152 | 147 | struct ibmvfc_npiv_logout_mad { |
|---|
| 153 | 148 | struct ibmvfc_mad_common common; |
|---|
| 154 | | -}__attribute__((packed, aligned (8))); |
|---|
| 149 | +} __packed __aligned(8); |
|---|
| 155 | 150 | |
|---|
| 156 | 151 | #define IBMVFC_MAX_NAME 256 |
|---|
| 157 | 152 | |
|---|
| .. | .. |
|---|
| 171 | 166 | __be32 max_cmds; |
|---|
| 172 | 167 | __be64 capabilities; |
|---|
| 173 | 168 | #define IBMVFC_CAN_MIGRATE 0x01 |
|---|
| 169 | +#define IBMVFC_CAN_USE_CHANNELS 0x02 |
|---|
| 170 | +#define IBMVFC_CAN_HANDLE_FPIN 0x04 |
|---|
| 174 | 171 | __be64 node_name; |
|---|
| 175 | 172 | struct srp_direct_buf async; |
|---|
| 176 | 173 | u8 partition_name[IBMVFC_MAX_NAME]; |
|---|
| 177 | 174 | u8 device_name[IBMVFC_MAX_NAME]; |
|---|
| 178 | 175 | u8 drc_name[IBMVFC_MAX_NAME]; |
|---|
| 179 | 176 | __be64 reserved2[2]; |
|---|
| 180 | | -}__attribute__((packed, aligned (8))); |
|---|
| 177 | +} __packed __aligned(8); |
|---|
| 181 | 178 | |
|---|
| 182 | 179 | struct ibmvfc_common_svc_parms { |
|---|
| 183 | 180 | __be16 fcph_version; |
|---|
| .. | .. |
|---|
| 186 | 183 | __be16 bb_rcv_sz; /* upper nibble is BB_SC_N */ |
|---|
| 187 | 184 | __be32 ratov; |
|---|
| 188 | 185 | __be32 edtov; |
|---|
| 189 | | -}__attribute__((packed, aligned (4))); |
|---|
| 186 | +} __packed __aligned(4); |
|---|
| 190 | 187 | |
|---|
| 191 | 188 | struct ibmvfc_service_parms { |
|---|
| 192 | 189 | struct ibmvfc_common_svc_parms common; |
|---|
| .. | .. |
|---|
| 201 | 198 | __be32 ext_len; |
|---|
| 202 | 199 | __be32 reserved[30]; |
|---|
| 203 | 200 | __be32 clk_sync_qos[2]; |
|---|
| 204 | | -}__attribute__((packed, aligned (4))); |
|---|
| 201 | + __be32 reserved2; |
|---|
| 202 | +} __packed __aligned(4); |
|---|
| 205 | 203 | |
|---|
| 206 | 204 | struct ibmvfc_npiv_login_resp { |
|---|
| 207 | 205 | __be32 version; |
|---|
| .. | .. |
|---|
| 213 | 211 | __be64 capabilities; |
|---|
| 214 | 212 | #define IBMVFC_CAN_FLUSH_ON_HALT 0x08 |
|---|
| 215 | 213 | #define IBMVFC_CAN_SUPPRESS_ABTS 0x10 |
|---|
| 214 | +#define IBMVFC_CAN_SUPPORT_CHANNELS 0x20 |
|---|
| 216 | 215 | __be32 max_cmds; |
|---|
| 217 | 216 | __be32 scsi_id_sz; |
|---|
| 218 | 217 | __be64 max_dma_len; |
|---|
| .. | .. |
|---|
| 226 | 225 | u8 drc_name[IBMVFC_MAX_NAME]; |
|---|
| 227 | 226 | struct ibmvfc_service_parms service_parms; |
|---|
| 228 | 227 | __be64 reserved2; |
|---|
| 229 | | -}__attribute__((packed, aligned (8))); |
|---|
| 228 | +} __packed __aligned(8); |
|---|
| 230 | 229 | |
|---|
| 231 | 230 | union ibmvfc_npiv_login_data { |
|---|
| 232 | 231 | struct ibmvfc_npiv_login login; |
|---|
| 233 | 232 | struct ibmvfc_npiv_login_resp resp; |
|---|
| 234 | | -}__attribute__((packed, aligned (8))); |
|---|
| 233 | +} __packed __aligned(8); |
|---|
| 235 | 234 | |
|---|
| 236 | | -struct ibmvfc_discover_targets_buf { |
|---|
| 237 | | - __be32 scsi_id[1]; |
|---|
| 235 | +struct ibmvfc_discover_targets_entry { |
|---|
| 236 | + __be32 scsi_id; |
|---|
| 237 | + __be32 pad; |
|---|
| 238 | + __be64 wwpn; |
|---|
| 238 | 239 | #define IBMVFC_DISC_TGT_SCSI_ID_MASK 0x00ffffff |
|---|
| 239 | | -}; |
|---|
| 240 | +} __packed __aligned(8); |
|---|
| 240 | 241 | |
|---|
| 241 | 242 | struct ibmvfc_discover_targets { |
|---|
| 242 | 243 | struct ibmvfc_mad_common common; |
|---|
| 243 | 244 | struct srp_direct_buf buffer; |
|---|
| 244 | 245 | __be32 flags; |
|---|
| 246 | +#define IBMVFC_DISC_TGT_PORT_ID_WWPN_LIST 0x02 |
|---|
| 245 | 247 | __be16 status; |
|---|
| 246 | 248 | __be16 error; |
|---|
| 247 | 249 | __be32 bufflen; |
|---|
| 248 | 250 | __be32 num_avail; |
|---|
| 249 | 251 | __be32 num_written; |
|---|
| 250 | 252 | __be64 reserved[2]; |
|---|
| 251 | | -}__attribute__((packed, aligned (8))); |
|---|
| 253 | +} __packed __aligned(8); |
|---|
| 252 | 254 | |
|---|
| 253 | 255 | enum ibmvfc_fc_reason { |
|---|
| 254 | 256 | IBMVFC_INVALID_ELS_CMD_CODE = 0x01, |
|---|
| .. | .. |
|---|
| 292 | 294 | struct ibmvfc_service_parms service_parms; |
|---|
| 293 | 295 | struct ibmvfc_service_parms service_parms_change; |
|---|
| 294 | 296 | __be64 reserved3[2]; |
|---|
| 295 | | -}__attribute__((packed, aligned (8))); |
|---|
| 297 | +} __packed __aligned(8); |
|---|
| 298 | + |
|---|
| 299 | +struct ibmvfc_move_login { |
|---|
| 300 | + struct ibmvfc_mad_common common; |
|---|
| 301 | + __be64 old_scsi_id; |
|---|
| 302 | + __be64 new_scsi_id; |
|---|
| 303 | + __be64 wwpn; |
|---|
| 304 | + __be64 node_name; |
|---|
| 305 | + __be32 flags; |
|---|
| 306 | +#define IBMVFC_MOVE_LOGIN_IMPLICIT_OLD_FAILED 0x01 |
|---|
| 307 | +#define IBMVFC_MOVE_LOGIN_IMPLICIT_NEW_FAILED 0x02 |
|---|
| 308 | +#define IBMVFC_MOVE_LOGIN_PORT_LOGIN_FAILED 0x04 |
|---|
| 309 | + __be32 reserved; |
|---|
| 310 | + struct ibmvfc_service_parms service_parms; |
|---|
| 311 | + struct ibmvfc_service_parms service_parms_change; |
|---|
| 312 | + __be32 reserved2; |
|---|
| 313 | + __be16 service_class; |
|---|
| 314 | + __be16 vios_flags; |
|---|
| 315 | +#define IBMVFC_MOVE_LOGIN_VF_NOT_SENT_ADAPTER 0x01 |
|---|
| 316 | + __be64 reserved3; |
|---|
| 317 | +} __packed __aligned(8); |
|---|
| 296 | 318 | |
|---|
| 297 | 319 | struct ibmvfc_prli_svc_parms { |
|---|
| 298 | 320 | u8 type; |
|---|
| .. | .. |
|---|
| 312 | 334 | #define IBMVFC_PRLI_TARGET_FUNC 0x00000010 |
|---|
| 313 | 335 | #define IBMVFC_PRLI_READ_FCP_XFER_RDY_DISABLED 0x00000002 |
|---|
| 314 | 336 | #define IBMVFC_PRLI_WR_FCP_XFER_RDY_DISABLED 0x00000001 |
|---|
| 315 | | -}__attribute__((packed, aligned (4))); |
|---|
| 337 | +} __packed __aligned(4); |
|---|
| 316 | 338 | |
|---|
| 317 | 339 | struct ibmvfc_process_login { |
|---|
| 318 | 340 | struct ibmvfc_mad_common common; |
|---|
| .. | .. |
|---|
| 323 | 345 | __be16 error; /* also fc_reason */ |
|---|
| 324 | 346 | __be32 reserved2; |
|---|
| 325 | 347 | __be64 reserved3[2]; |
|---|
| 326 | | -}__attribute__((packed, aligned (8))); |
|---|
| 348 | +} __packed __aligned(8); |
|---|
| 327 | 349 | |
|---|
| 328 | 350 | struct ibmvfc_query_tgt { |
|---|
| 329 | 351 | struct ibmvfc_mad_common common; |
|---|
| .. | .. |
|---|
| 334 | 356 | __be16 fc_explain; |
|---|
| 335 | 357 | __be16 fc_type; |
|---|
| 336 | 358 | __be64 reserved[2]; |
|---|
| 337 | | -}__attribute__((packed, aligned (8))); |
|---|
| 359 | +} __packed __aligned(8); |
|---|
| 338 | 360 | |
|---|
| 339 | 361 | struct ibmvfc_implicit_logout { |
|---|
| 340 | 362 | struct ibmvfc_mad_common common; |
|---|
| 341 | 363 | __be64 old_scsi_id; |
|---|
| 342 | 364 | __be64 reserved[2]; |
|---|
| 343 | | -}__attribute__((packed, aligned (8))); |
|---|
| 365 | +} __packed __aligned(8); |
|---|
| 344 | 366 | |
|---|
| 345 | 367 | struct ibmvfc_tmf { |
|---|
| 346 | 368 | struct ibmvfc_mad_common common; |
|---|
| .. | .. |
|---|
| 357 | 379 | __be32 my_cancel_key; |
|---|
| 358 | 380 | __be32 pad; |
|---|
| 359 | 381 | __be64 reserved[2]; |
|---|
| 360 | | -}__attribute__((packed, aligned (8))); |
|---|
| 382 | +} __packed __aligned(8); |
|---|
| 361 | 383 | |
|---|
| 362 | 384 | enum ibmvfc_fcp_rsp_info_codes { |
|---|
| 363 | 385 | RSP_NO_FAILURE = 0x00, |
|---|
| .. | .. |
|---|
| 370 | 392 | u8 reserved[3]; |
|---|
| 371 | 393 | u8 rsp_code; |
|---|
| 372 | 394 | u8 reserved2[4]; |
|---|
| 373 | | -}__attribute__((packed, aligned (2))); |
|---|
| 395 | +} __packed __aligned(2); |
|---|
| 374 | 396 | |
|---|
| 375 | 397 | enum ibmvfc_fcp_rsp_flags { |
|---|
| 376 | 398 | FCP_BIDI_RSP = 0x80, |
|---|
| .. | .. |
|---|
| 386 | 408 | union ibmvfc_fcp_rsp_data { |
|---|
| 387 | 409 | struct ibmvfc_fcp_rsp_info info; |
|---|
| 388 | 410 | u8 sense[SCSI_SENSE_BUFFERSIZE + sizeof(struct ibmvfc_fcp_rsp_info)]; |
|---|
| 389 | | -}__attribute__((packed, aligned (8))); |
|---|
| 411 | +} __packed __aligned(8); |
|---|
| 390 | 412 | |
|---|
| 391 | 413 | struct ibmvfc_fcp_rsp { |
|---|
| 392 | 414 | __be64 reserved; |
|---|
| .. | .. |
|---|
| 397 | 419 | __be32 fcp_sense_len; |
|---|
| 398 | 420 | __be32 fcp_rsp_len; |
|---|
| 399 | 421 | union ibmvfc_fcp_rsp_data data; |
|---|
| 400 | | -}__attribute__((packed, aligned (8))); |
|---|
| 422 | +} __packed __aligned(8); |
|---|
| 401 | 423 | |
|---|
| 402 | 424 | enum ibmvfc_cmd_flags { |
|---|
| 403 | 425 | IBMVFC_SCATTERLIST = 0x0001, |
|---|
| .. | .. |
|---|
| 431 | 453 | #define IBMVFC_WRDATA 0x01 |
|---|
| 432 | 454 | u8 cdb[IBMVFC_MAX_CDB_LEN]; |
|---|
| 433 | 455 | __be32 xfer_len; |
|---|
| 434 | | -}__attribute__((packed, aligned (4))); |
|---|
| 456 | +} __packed __aligned(4); |
|---|
| 435 | 457 | |
|---|
| 436 | 458 | struct ibmvfc_cmd { |
|---|
| 437 | 459 | __be64 task_tag; |
|---|
| .. | .. |
|---|
| 455 | 477 | __be64 reserved3[2]; |
|---|
| 456 | 478 | struct ibmvfc_fcp_cmd_iu iu; |
|---|
| 457 | 479 | struct ibmvfc_fcp_rsp rsp; |
|---|
| 458 | | -}__attribute__((packed, aligned (8))); |
|---|
| 480 | +} __packed __aligned(8); |
|---|
| 459 | 481 | |
|---|
| 460 | 482 | struct ibmvfc_passthru_fc_iu { |
|---|
| 461 | 483 | __be32 payload[7]; |
|---|
| .. | .. |
|---|
| 482 | 504 | __be64 scsi_id; |
|---|
| 483 | 505 | __be64 tag; |
|---|
| 484 | 506 | __be64 reserved2[2]; |
|---|
| 485 | | -}__attribute__((packed, aligned (8))); |
|---|
| 507 | +} __packed __aligned(8); |
|---|
| 486 | 508 | |
|---|
| 487 | 509 | struct ibmvfc_passthru_mad { |
|---|
| 488 | 510 | struct ibmvfc_mad_common common; |
|---|
| 489 | 511 | struct srp_direct_buf cmd_ioba; |
|---|
| 490 | 512 | struct ibmvfc_passthru_iu iu; |
|---|
| 491 | 513 | struct ibmvfc_passthru_fc_iu fc_iu; |
|---|
| 492 | | -}__attribute__((packed, aligned (8))); |
|---|
| 514 | +} __packed __aligned(8); |
|---|
| 515 | + |
|---|
| 516 | +struct ibmvfc_channel_enquiry { |
|---|
| 517 | + struct ibmvfc_mad_common common; |
|---|
| 518 | + __be32 flags; |
|---|
| 519 | +#define IBMVFC_NO_CHANNELS_TO_CRQ_SUPPORT 0x01 |
|---|
| 520 | +#define IBMVFC_SUPPORT_VARIABLE_SUBQ_MSG 0x02 |
|---|
| 521 | +#define IBMVFC_NO_N_TO_M_CHANNELS_SUPPORT 0x04 |
|---|
| 522 | + __be32 num_scsi_subq_channels; |
|---|
| 523 | + __be32 num_nvmeof_subq_channels; |
|---|
| 524 | + __be32 num_scsi_vas_channels; |
|---|
| 525 | + __be32 num_nvmeof_vas_channels; |
|---|
| 526 | +} __packed __aligned(8); |
|---|
| 527 | + |
|---|
| 528 | +struct ibmvfc_channel_setup_mad { |
|---|
| 529 | + struct ibmvfc_mad_common common; |
|---|
| 530 | + struct srp_direct_buf buffer; |
|---|
| 531 | +} __packed __aligned(8); |
|---|
| 532 | + |
|---|
| 533 | +#define IBMVFC_MAX_CHANNELS 502 |
|---|
| 534 | + |
|---|
| 535 | +struct ibmvfc_channel_setup { |
|---|
| 536 | + __be32 flags; |
|---|
| 537 | +#define IBMVFC_CANCEL_CHANNELS 0x01 |
|---|
| 538 | +#define IBMVFC_USE_BUFFER 0x02 |
|---|
| 539 | +#define IBMVFC_CHANNELS_CANCELED 0x04 |
|---|
| 540 | + __be32 reserved; |
|---|
| 541 | + __be32 num_scsi_subq_channels; |
|---|
| 542 | + __be32 num_nvmeof_subq_channels; |
|---|
| 543 | + __be32 num_scsi_vas_channels; |
|---|
| 544 | + __be32 num_nvmeof_vas_channels; |
|---|
| 545 | + struct srp_direct_buf buffer; |
|---|
| 546 | + __be64 reserved2[5]; |
|---|
| 547 | + __be64 channel_handles[IBMVFC_MAX_CHANNELS]; |
|---|
| 548 | +} __packed __aligned(8); |
|---|
| 549 | + |
|---|
| 550 | +struct ibmvfc_connection_info { |
|---|
| 551 | + struct ibmvfc_mad_common common; |
|---|
| 552 | + __be64 information_bits; |
|---|
| 553 | +#define IBMVFC_NO_FC_IO_CHANNEL 0x01 |
|---|
| 554 | +#define IBMVFC_NO_PHYP_VAS 0x02 |
|---|
| 555 | +#define IBMVFC_NO_PHYP_SUBQ 0x04 |
|---|
| 556 | +#define IBMVFC_PHYP_DEPRECATED_SUBQ 0x08 |
|---|
| 557 | +#define IBMVFC_PHYP_PRESERVED_SUBQ 0x10 |
|---|
| 558 | +#define IBMVFC_PHYP_FULL_SUBQ 0x20 |
|---|
| 559 | + __be64 reserved[16]; |
|---|
| 560 | +} __packed __aligned(8); |
|---|
| 493 | 561 | |
|---|
| 494 | 562 | struct ibmvfc_trace_start_entry { |
|---|
| 495 | 563 | u32 xfer_len; |
|---|
| 496 | | -}__attribute__((packed)); |
|---|
| 564 | +} __packed; |
|---|
| 497 | 565 | |
|---|
| 498 | 566 | struct ibmvfc_trace_end_entry { |
|---|
| 499 | 567 | u16 status; |
|---|
| .. | .. |
|---|
| 502 | 570 | u8 rsp_code; |
|---|
| 503 | 571 | u8 scsi_status; |
|---|
| 504 | 572 | u8 reserved; |
|---|
| 505 | | -}__attribute__((packed)); |
|---|
| 573 | +} __packed; |
|---|
| 506 | 574 | |
|---|
| 507 | 575 | struct ibmvfc_trace_entry { |
|---|
| 508 | 576 | struct ibmvfc_event *evt; |
|---|
| .. | .. |
|---|
| 519 | 587 | struct ibmvfc_trace_start_entry start; |
|---|
| 520 | 588 | struct ibmvfc_trace_end_entry end; |
|---|
| 521 | 589 | } u; |
|---|
| 522 | | -}__attribute__((packed, aligned (8))); |
|---|
| 590 | +} __packed __aligned(8); |
|---|
| 523 | 591 | |
|---|
| 524 | 592 | enum ibmvfc_crq_formats { |
|---|
| 525 | 593 | IBMVFC_CMD_FORMAT = 0x01, |
|---|
| .. | .. |
|---|
| 541 | 609 | IBMVFC_AE_HALT = 0x0400, |
|---|
| 542 | 610 | IBMVFC_AE_RESUME = 0x0800, |
|---|
| 543 | 611 | IBMVFC_AE_ADAPTER_FAILED = 0x1000, |
|---|
| 612 | + IBMVFC_AE_FPIN = 0x2000, |
|---|
| 544 | 613 | }; |
|---|
| 545 | 614 | |
|---|
| 546 | 615 | struct ibmvfc_async_desc { |
|---|
| .. | .. |
|---|
| 554 | 623 | volatile u8 format; |
|---|
| 555 | 624 | u8 reserved[6]; |
|---|
| 556 | 625 | volatile __be64 ioba; |
|---|
| 557 | | -}__attribute__((packed, aligned (8))); |
|---|
| 626 | +} __packed __aligned(8); |
|---|
| 558 | 627 | |
|---|
| 559 | 628 | struct ibmvfc_crq_queue { |
|---|
| 560 | 629 | struct ibmvfc_crq *msgs; |
|---|
| .. | .. |
|---|
| 569 | 638 | IBMVFC_AE_LS_LINK_DEAD = 0x08, |
|---|
| 570 | 639 | }; |
|---|
| 571 | 640 | |
|---|
| 641 | +enum ibmvfc_ae_fpin_status { |
|---|
| 642 | + IBMVFC_AE_FPIN_LINK_CONGESTED = 0x1, |
|---|
| 643 | + IBMVFC_AE_FPIN_PORT_CONGESTED = 0x2, |
|---|
| 644 | + IBMVFC_AE_FPIN_PORT_CLEARED = 0x3, |
|---|
| 645 | + IBMVFC_AE_FPIN_PORT_DEGRADED = 0x4, |
|---|
| 646 | +}; |
|---|
| 647 | + |
|---|
| 572 | 648 | struct ibmvfc_async_crq { |
|---|
| 573 | 649 | volatile u8 valid; |
|---|
| 574 | 650 | u8 link_state; |
|---|
| 575 | | - u8 pad[2]; |
|---|
| 651 | + u8 fpin_status; |
|---|
| 652 | + u8 pad; |
|---|
| 576 | 653 | __be32 pad2; |
|---|
| 577 | 654 | volatile __be64 event; |
|---|
| 578 | 655 | volatile __be64 scsi_id; |
|---|
| 579 | 656 | volatile __be64 wwpn; |
|---|
| 580 | 657 | volatile __be64 node_name; |
|---|
| 581 | 658 | __be64 reserved; |
|---|
| 582 | | -}__attribute__((packed, aligned (8))); |
|---|
| 659 | +} __packed __aligned(8); |
|---|
| 583 | 660 | |
|---|
| 584 | 661 | struct ibmvfc_async_crq_queue { |
|---|
| 585 | 662 | struct ibmvfc_async_crq *msgs; |
|---|
| .. | .. |
|---|
| 594 | 671 | struct ibmvfc_discover_targets discover_targets; |
|---|
| 595 | 672 | struct ibmvfc_port_login plogi; |
|---|
| 596 | 673 | struct ibmvfc_process_login prli; |
|---|
| 674 | + struct ibmvfc_move_login move_login; |
|---|
| 597 | 675 | struct ibmvfc_query_tgt query_tgt; |
|---|
| 598 | 676 | struct ibmvfc_implicit_logout implicit_logout; |
|---|
| 599 | 677 | struct ibmvfc_tmf tmf; |
|---|
| 600 | 678 | struct ibmvfc_cmd cmd; |
|---|
| 601 | 679 | struct ibmvfc_passthru_mad passthru; |
|---|
| 602 | | -}__attribute__((packed, aligned (8))); |
|---|
| 680 | + struct ibmvfc_channel_enquiry channel_enquiry; |
|---|
| 681 | + struct ibmvfc_channel_setup_mad channel_setup; |
|---|
| 682 | + struct ibmvfc_connection_info connection_info; |
|---|
| 683 | +} __packed __aligned(8); |
|---|
| 603 | 684 | |
|---|
| 604 | 685 | enum ibmvfc_target_action { |
|---|
| 605 | 686 | IBMVFC_TGT_ACTION_NONE = 0, |
|---|
| 606 | 687 | IBMVFC_TGT_ACTION_INIT, |
|---|
| 607 | 688 | IBMVFC_TGT_ACTION_INIT_WAIT, |
|---|
| 689 | + IBMVFC_TGT_ACTION_LOGOUT_RPORT, |
|---|
| 690 | + IBMVFC_TGT_ACTION_LOGOUT_RPORT_WAIT, |
|---|
| 608 | 691 | IBMVFC_TGT_ACTION_DEL_RPORT, |
|---|
| 609 | 692 | IBMVFC_TGT_ACTION_DELETED_RPORT, |
|---|
| 693 | + IBMVFC_TGT_ACTION_DEL_AND_LOGOUT_RPORT, |
|---|
| 694 | + IBMVFC_TGT_ACTION_LOGOUT_DELETED_RPORT, |
|---|
| 610 | 695 | }; |
|---|
| 611 | 696 | |
|---|
| 612 | 697 | struct ibmvfc_target { |
|---|
| 613 | 698 | struct list_head queue; |
|---|
| 614 | 699 | struct ibmvfc_host *vhost; |
|---|
| 615 | 700 | u64 scsi_id; |
|---|
| 616 | | - u64 new_scsi_id; |
|---|
| 701 | + u64 wwpn; |
|---|
| 702 | + u64 old_scsi_id; |
|---|
| 617 | 703 | struct fc_rport *rport; |
|---|
| 618 | 704 | int target_id; |
|---|
| 619 | 705 | enum ibmvfc_target_action action; |
|---|
| .. | .. |
|---|
| 709 | 795 | dma_addr_t login_buf_dma; |
|---|
| 710 | 796 | int disc_buf_sz; |
|---|
| 711 | 797 | int log_level; |
|---|
| 712 | | - struct ibmvfc_discover_targets_buf *disc_buf; |
|---|
| 798 | + struct ibmvfc_discover_targets_entry *disc_buf; |
|---|
| 713 | 799 | struct mutex passthru_mutex; |
|---|
| 714 | 800 | int task_set; |
|---|
| 715 | 801 | int init_retries; |
|---|