forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/scsi/lpfc/lpfc_hw.h
....@@ -1,7 +1,7 @@
11 /*******************************************************************
22 * This file is part of the Emulex Linux Device Driver for *
33 * 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 *
55 * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
66 * Copyright (C) 2004-2016 Emulex. All rights reserved. *
77 * EMULEX and SLI are trademarks of Emulex. *
....@@ -22,7 +22,7 @@
2222
2323 #define FDMI_DID 0xfffffaU
2424 #define NameServer_DID 0xfffffcU
25
-#define SCR_DID 0xfffffdU
25
+#define Fabric_Cntl_DID 0xfffffdU
2626 #define Fabric_DID 0xfffffeU
2727 #define Bcast_DID 0xffffffU
2828 #define Mask_DID 0xffffffU
....@@ -115,6 +115,7 @@
115115 uint32_t PortID;
116116 struct gid {
117117 uint8_t PortType; /* for GID_PT requests */
118
+#define GID_PT_N_PORT 1
118119 uint8_t DomainScope;
119120 uint8_t AreaScope;
120121 uint8_t Fc4Type; /* for GID_FT requests */
....@@ -559,6 +560,8 @@
559560 #define fc_vft_hdr_hopct_WORD word1
560561 };
561562
563
+#include <uapi/scsi/fc/fc_els.h>
564
+
562565 /*
563566 * Extended Link Service LS_COMMAND codes (Payload Word 0)
564567 */
....@@ -585,6 +588,7 @@
585588 #define ELS_CMD_RRQ 0x12000000
586589 #define ELS_CMD_REC 0x13000000
587590 #define ELS_CMD_RDP 0x18000000
591
+#define ELS_CMD_RDF 0x19000000
588592 #define ELS_CMD_PRLI 0x20100014
589593 #define ELS_CMD_NVMEPRLI 0x20140018
590594 #define ELS_CMD_PRLO 0x21100014
....@@ -594,14 +598,15 @@
594598 #define ELS_CMD_ADISC 0x52000000
595599 #define ELS_CMD_FARP 0x54000000
596600 #define ELS_CMD_FARPR 0x55000000
597
-#define ELS_CMD_RPS 0x56000000
598601 #define ELS_CMD_RPL 0x57000000
599602 #define ELS_CMD_FAN 0x60000000
600603 #define ELS_CMD_RSCN 0x61040000
604
+#define ELS_CMD_RSCN_XMT 0x61040008
601605 #define ELS_CMD_SCR 0x62000000
602606 #define ELS_CMD_RNID 0x78000000
603607 #define ELS_CMD_LIRR 0x7A000000
604608 #define ELS_CMD_LCB 0x81000000
609
+#define ELS_CMD_FPIN 0x16000000
605610 #else /* __LITTLE_ENDIAN_BITFIELD */
606611 #define ELS_CMD_MASK 0xffff
607612 #define ELS_RSP_MASK 0xff
....@@ -625,6 +630,7 @@
625630 #define ELS_CMD_RRQ 0x12
626631 #define ELS_CMD_REC 0x13
627632 #define ELS_CMD_RDP 0x18
633
+#define ELS_CMD_RDF 0x19
628634 #define ELS_CMD_PRLI 0x14001020
629635 #define ELS_CMD_NVMEPRLI 0x18001420
630636 #define ELS_CMD_PRLO 0x14001021
....@@ -634,14 +640,15 @@
634640 #define ELS_CMD_ADISC 0x52
635641 #define ELS_CMD_FARP 0x54
636642 #define ELS_CMD_FARPR 0x55
637
-#define ELS_CMD_RPS 0x56
638643 #define ELS_CMD_RPL 0x57
639644 #define ELS_CMD_FAN 0x60
640645 #define ELS_CMD_RSCN 0x0461
646
+#define ELS_CMD_RSCN_XMT 0x08000461
641647 #define ELS_CMD_SCR 0x62
642648 #define ELS_CMD_RNID 0x78
643649 #define ELS_CMD_LIRR 0x7A
644650 #define ELS_CMD_LCB 0x81
651
+#define ELS_CMD_FPIN ELS_FPIN
645652 #endif
646653
647654 /*
....@@ -836,7 +843,7 @@
836843 struct lpfc_name portName;
837844 struct lpfc_name nodeName;
838845 uint32_t DID;
839
-} ADISC;
846
+} __packed ADISC;
840847
841848 typedef struct _FARP { /* Structure is in Big Endian format */
842849 uint32_t Mflags:8;
....@@ -866,7 +873,7 @@
866873 uint32_t Fdid;
867874 struct lpfc_name FportName;
868875 struct lpfc_name FnodeName;
869
-} FAN;
876
+} __packed FAN;
870877
871878 typedef struct _SCR { /* Structure is in Big Endian format */
872879 uint8_t resvd1;
....@@ -910,25 +917,7 @@
910917 union {
911918 RNID_TOP_DISC topologyDisc; /* topology disc (0xdf) */
912919 } 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;
932921
933922 struct RLS { /* Structure is in Big Endian format */
934923 uint32_t rls;
....@@ -3273,8 +3262,7 @@
32733262 #endif
32743263
32753264 #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 */
32783266 uint32_t casabt : 1; /* Configure async abts status notice */
32793267 uint32_t rsvd2 : 2; /* Reserved */
32803268 uint32_t cbg : 1; /* Configure BlockGuard */
....@@ -3298,12 +3286,10 @@
32983286 uint32_t cbg : 1; /* Configure BlockGuard */
32993287 uint32_t rsvd2 : 2; /* Reserved */
33003288 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 */
33033290 #endif
33043291 #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 */
33073293 uint32_t gasabt : 1; /* Grant async abts status notice */
33083294 uint32_t rsvd4 : 2; /* Reserved */
33093295 uint32_t gbg : 1; /* Grant BlockGuard */
....@@ -3327,8 +3313,7 @@
33273313 uint32_t gbg : 1; /* Grant BlockGuard */
33283314 uint32_t rsvd4 : 2; /* Reserved */
33293315 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 */
33323317 #endif
33333318
33343319 #ifdef __BIG_ENDIAN_BITFIELD
....@@ -3350,15 +3335,11 @@
33503335 uint32_t rsvd6; /* Reserved */
33513336
33523337 #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;
33563339 uint32_t max_vpi : 16; /* Max number of virt N-Ports */
33573340 #else /* __LITTLE_ENDIAN */
33583341 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;
33623343 #endif
33633344
33643345 } CONFIG_PORT_VAR;