| .. | .. |
|---|
| 1 | 1 | /******************************************************************* |
|---|
| 2 | 2 | * This file is part of the Emulex Linux Device Driver for * |
|---|
| 3 | 3 | * Fibre Channel Host Bus Adapters. * |
|---|
| 4 | | - * Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term * |
|---|
| 4 | + * Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term * |
|---|
| 5 | 5 | * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * |
|---|
| 6 | 6 | * Copyright (C) 2004-2016 Emulex. All rights reserved. * |
|---|
| 7 | 7 | * EMULEX and SLI are trademarks of Emulex. * |
|---|
| .. | .. |
|---|
| 22 | 22 | |
|---|
| 23 | 23 | #define FDMI_DID 0xfffffaU |
|---|
| 24 | 24 | #define NameServer_DID 0xfffffcU |
|---|
| 25 | | -#define SCR_DID 0xfffffdU |
|---|
| 25 | +#define Fabric_Cntl_DID 0xfffffdU |
|---|
| 26 | 26 | #define Fabric_DID 0xfffffeU |
|---|
| 27 | 27 | #define Bcast_DID 0xffffffU |
|---|
| 28 | 28 | #define Mask_DID 0xffffffU |
|---|
| .. | .. |
|---|
| 115 | 115 | uint32_t PortID; |
|---|
| 116 | 116 | struct gid { |
|---|
| 117 | 117 | uint8_t PortType; /* for GID_PT requests */ |
|---|
| 118 | +#define GID_PT_N_PORT 1 |
|---|
| 118 | 119 | uint8_t DomainScope; |
|---|
| 119 | 120 | uint8_t AreaScope; |
|---|
| 120 | 121 | uint8_t Fc4Type; /* for GID_FT requests */ |
|---|
| .. | .. |
|---|
| 559 | 560 | #define fc_vft_hdr_hopct_WORD word1 |
|---|
| 560 | 561 | }; |
|---|
| 561 | 562 | |
|---|
| 563 | +#include <uapi/scsi/fc/fc_els.h> |
|---|
| 564 | + |
|---|
| 562 | 565 | /* |
|---|
| 563 | 566 | * Extended Link Service LS_COMMAND codes (Payload Word 0) |
|---|
| 564 | 567 | */ |
|---|
| .. | .. |
|---|
| 585 | 588 | #define ELS_CMD_RRQ 0x12000000 |
|---|
| 586 | 589 | #define ELS_CMD_REC 0x13000000 |
|---|
| 587 | 590 | #define ELS_CMD_RDP 0x18000000 |
|---|
| 591 | +#define ELS_CMD_RDF 0x19000000 |
|---|
| 588 | 592 | #define ELS_CMD_PRLI 0x20100014 |
|---|
| 589 | 593 | #define ELS_CMD_NVMEPRLI 0x20140018 |
|---|
| 590 | 594 | #define ELS_CMD_PRLO 0x21100014 |
|---|
| .. | .. |
|---|
| 594 | 598 | #define ELS_CMD_ADISC 0x52000000 |
|---|
| 595 | 599 | #define ELS_CMD_FARP 0x54000000 |
|---|
| 596 | 600 | #define ELS_CMD_FARPR 0x55000000 |
|---|
| 597 | | -#define ELS_CMD_RPS 0x56000000 |
|---|
| 598 | 601 | #define ELS_CMD_RPL 0x57000000 |
|---|
| 599 | 602 | #define ELS_CMD_FAN 0x60000000 |
|---|
| 600 | 603 | #define ELS_CMD_RSCN 0x61040000 |
|---|
| 604 | +#define ELS_CMD_RSCN_XMT 0x61040008 |
|---|
| 601 | 605 | #define ELS_CMD_SCR 0x62000000 |
|---|
| 602 | 606 | #define ELS_CMD_RNID 0x78000000 |
|---|
| 603 | 607 | #define ELS_CMD_LIRR 0x7A000000 |
|---|
| 604 | 608 | #define ELS_CMD_LCB 0x81000000 |
|---|
| 609 | +#define ELS_CMD_FPIN 0x16000000 |
|---|
| 605 | 610 | #else /* __LITTLE_ENDIAN_BITFIELD */ |
|---|
| 606 | 611 | #define ELS_CMD_MASK 0xffff |
|---|
| 607 | 612 | #define ELS_RSP_MASK 0xff |
|---|
| .. | .. |
|---|
| 625 | 630 | #define ELS_CMD_RRQ 0x12 |
|---|
| 626 | 631 | #define ELS_CMD_REC 0x13 |
|---|
| 627 | 632 | #define ELS_CMD_RDP 0x18 |
|---|
| 633 | +#define ELS_CMD_RDF 0x19 |
|---|
| 628 | 634 | #define ELS_CMD_PRLI 0x14001020 |
|---|
| 629 | 635 | #define ELS_CMD_NVMEPRLI 0x18001420 |
|---|
| 630 | 636 | #define ELS_CMD_PRLO 0x14001021 |
|---|
| .. | .. |
|---|
| 634 | 640 | #define ELS_CMD_ADISC 0x52 |
|---|
| 635 | 641 | #define ELS_CMD_FARP 0x54 |
|---|
| 636 | 642 | #define ELS_CMD_FARPR 0x55 |
|---|
| 637 | | -#define ELS_CMD_RPS 0x56 |
|---|
| 638 | 643 | #define ELS_CMD_RPL 0x57 |
|---|
| 639 | 644 | #define ELS_CMD_FAN 0x60 |
|---|
| 640 | 645 | #define ELS_CMD_RSCN 0x0461 |
|---|
| 646 | +#define ELS_CMD_RSCN_XMT 0x08000461 |
|---|
| 641 | 647 | #define ELS_CMD_SCR 0x62 |
|---|
| 642 | 648 | #define ELS_CMD_RNID 0x78 |
|---|
| 643 | 649 | #define ELS_CMD_LIRR 0x7A |
|---|
| 644 | 650 | #define ELS_CMD_LCB 0x81 |
|---|
| 651 | +#define ELS_CMD_FPIN ELS_FPIN |
|---|
| 645 | 652 | #endif |
|---|
| 646 | 653 | |
|---|
| 647 | 654 | /* |
|---|
| .. | .. |
|---|
| 836 | 843 | struct lpfc_name portName; |
|---|
| 837 | 844 | struct lpfc_name nodeName; |
|---|
| 838 | 845 | uint32_t DID; |
|---|
| 839 | | -} ADISC; |
|---|
| 846 | +} __packed ADISC; |
|---|
| 840 | 847 | |
|---|
| 841 | 848 | typedef struct _FARP { /* Structure is in Big Endian format */ |
|---|
| 842 | 849 | uint32_t Mflags:8; |
|---|
| .. | .. |
|---|
| 866 | 873 | uint32_t Fdid; |
|---|
| 867 | 874 | struct lpfc_name FportName; |
|---|
| 868 | 875 | struct lpfc_name FnodeName; |
|---|
| 869 | | -} FAN; |
|---|
| 876 | +} __packed FAN; |
|---|
| 870 | 877 | |
|---|
| 871 | 878 | typedef struct _SCR { /* Structure is in Big Endian format */ |
|---|
| 872 | 879 | uint8_t resvd1; |
|---|
| .. | .. |
|---|
| 910 | 917 | union { |
|---|
| 911 | 918 | RNID_TOP_DISC topologyDisc; /* topology disc (0xdf) */ |
|---|
| 912 | 919 | } un; |
|---|
| 913 | | -} RNID; |
|---|
| 914 | | - |
|---|
| 915 | | -typedef struct _RPS { /* Structure is in Big Endian format */ |
|---|
| 916 | | - union { |
|---|
| 917 | | - uint32_t portNum; |
|---|
| 918 | | - struct lpfc_name portName; |
|---|
| 919 | | - } un; |
|---|
| 920 | | -} RPS; |
|---|
| 921 | | - |
|---|
| 922 | | -typedef struct _RPS_RSP { /* Structure is in Big Endian format */ |
|---|
| 923 | | - uint16_t rsvd1; |
|---|
| 924 | | - uint16_t portStatus; |
|---|
| 925 | | - uint32_t linkFailureCnt; |
|---|
| 926 | | - uint32_t lossSyncCnt; |
|---|
| 927 | | - uint32_t lossSignalCnt; |
|---|
| 928 | | - uint32_t primSeqErrCnt; |
|---|
| 929 | | - uint32_t invalidXmitWord; |
|---|
| 930 | | - uint32_t crcCnt; |
|---|
| 931 | | -} RPS_RSP; |
|---|
| 920 | +} __packed RNID; |
|---|
| 932 | 921 | |
|---|
| 933 | 922 | struct RLS { /* Structure is in Big Endian format */ |
|---|
| 934 | 923 | uint32_t rls; |
|---|
| .. | .. |
|---|
| 3273 | 3262 | #endif |
|---|
| 3274 | 3263 | |
|---|
| 3275 | 3264 | #ifdef __BIG_ENDIAN_BITFIELD |
|---|
| 3276 | | - uint32_t rsvd1 : 19; /* Reserved */ |
|---|
| 3277 | | - uint32_t cdss : 1; /* Configure Data Security SLI */ |
|---|
| 3265 | + uint32_t rsvd1 : 20; /* Reserved */ |
|---|
| 3278 | 3266 | uint32_t casabt : 1; /* Configure async abts status notice */ |
|---|
| 3279 | 3267 | uint32_t rsvd2 : 2; /* Reserved */ |
|---|
| 3280 | 3268 | uint32_t cbg : 1; /* Configure BlockGuard */ |
|---|
| .. | .. |
|---|
| 3298 | 3286 | uint32_t cbg : 1; /* Configure BlockGuard */ |
|---|
| 3299 | 3287 | uint32_t rsvd2 : 2; /* Reserved */ |
|---|
| 3300 | 3288 | uint32_t casabt : 1; /* Configure async abts status notice */ |
|---|
| 3301 | | - uint32_t cdss : 1; /* Configure Data Security SLI */ |
|---|
| 3302 | | - uint32_t rsvd1 : 19; /* Reserved */ |
|---|
| 3289 | + uint32_t rsvd1 : 20; /* Reserved */ |
|---|
| 3303 | 3290 | #endif |
|---|
| 3304 | 3291 | #ifdef __BIG_ENDIAN_BITFIELD |
|---|
| 3305 | | - uint32_t rsvd3 : 19; /* Reserved */ |
|---|
| 3306 | | - uint32_t gdss : 1; /* Configure Data Security SLI */ |
|---|
| 3292 | + uint32_t rsvd3 : 20; /* Reserved */ |
|---|
| 3307 | 3293 | uint32_t gasabt : 1; /* Grant async abts status notice */ |
|---|
| 3308 | 3294 | uint32_t rsvd4 : 2; /* Reserved */ |
|---|
| 3309 | 3295 | uint32_t gbg : 1; /* Grant BlockGuard */ |
|---|
| .. | .. |
|---|
| 3327 | 3313 | uint32_t gbg : 1; /* Grant BlockGuard */ |
|---|
| 3328 | 3314 | uint32_t rsvd4 : 2; /* Reserved */ |
|---|
| 3329 | 3315 | uint32_t gasabt : 1; /* Grant async abts status notice */ |
|---|
| 3330 | | - uint32_t gdss : 1; /* Configure Data Security SLI */ |
|---|
| 3331 | | - uint32_t rsvd3 : 19; /* Reserved */ |
|---|
| 3316 | + uint32_t rsvd3 : 20; /* Reserved */ |
|---|
| 3332 | 3317 | #endif |
|---|
| 3333 | 3318 | |
|---|
| 3334 | 3319 | #ifdef __BIG_ENDIAN_BITFIELD |
|---|
| .. | .. |
|---|
| 3350 | 3335 | uint32_t rsvd6; /* Reserved */ |
|---|
| 3351 | 3336 | |
|---|
| 3352 | 3337 | #ifdef __BIG_ENDIAN_BITFIELD |
|---|
| 3353 | | - uint32_t fips_rev : 3; /* FIPS Spec Revision */ |
|---|
| 3354 | | - uint32_t fips_level : 4; /* FIPS Level */ |
|---|
| 3355 | | - uint32_t sec_err : 9; /* security crypto error */ |
|---|
| 3338 | + uint32_t rsvd7 : 16; |
|---|
| 3356 | 3339 | uint32_t max_vpi : 16; /* Max number of virt N-Ports */ |
|---|
| 3357 | 3340 | #else /* __LITTLE_ENDIAN */ |
|---|
| 3358 | 3341 | uint32_t max_vpi : 16; /* Max number of virt N-Ports */ |
|---|
| 3359 | | - uint32_t sec_err : 9; /* security crypto error */ |
|---|
| 3360 | | - uint32_t fips_level : 4; /* FIPS Level */ |
|---|
| 3361 | | - uint32_t fips_rev : 3; /* FIPS Spec Revision */ |
|---|
| 3342 | + uint32_t rsvd7 : 16; |
|---|
| 3362 | 3343 | #endif |
|---|
| 3363 | 3344 | |
|---|
| 3364 | 3345 | } CONFIG_PORT_VAR; |
|---|