Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Copyright Gavin Shan, IBM Corporation 2016.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #ifndef __NCSI_PKT_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #define __NCSI_PKT_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) struct ncsi_pkt_hdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 	unsigned char mc_id;        /* Management controller ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 	unsigned char revision;     /* NCSI version - 0x01      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 	unsigned char reserved;     /* Reserved                 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 	unsigned char id;           /* Packet sequence number   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) 	unsigned char type;         /* Packet type              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 	unsigned char channel;      /* Network controller ID    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 	__be16        length;       /* Payload length           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 	__be32        reserved1[2]; /* Reserved                 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) struct ncsi_cmd_pkt_hdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	struct ncsi_pkt_hdr common; /* Common NCSI packet header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) struct ncsi_rsp_pkt_hdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	struct ncsi_pkt_hdr common; /* Common NCSI packet header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	__be16              code;   /* Response code             */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	__be16              reason; /* Response reason           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) struct ncsi_aen_pkt_hdr {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	struct ncsi_pkt_hdr common;       /* Common NCSI packet header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	unsigned char       reserved2[3]; /* Reserved                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	unsigned char       type;         /* AEN packet type           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) /* NCSI common command packet */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) struct ncsi_cmd_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	struct ncsi_cmd_pkt_hdr cmd;      /* Command header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	__be32                  checksum; /* Checksum       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	unsigned char           pad[26];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) struct ncsi_rsp_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	struct ncsi_rsp_pkt_hdr rsp;      /* Response header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	__be32                  checksum; /* Checksum        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	unsigned char           pad[22];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) /* Select Package */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) struct ncsi_cmd_sp_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	struct ncsi_cmd_pkt_hdr cmd;            /* Command header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	unsigned char           reserved[3];    /* Reserved       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	unsigned char           hw_arbitration; /* HW arbitration */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	__be32                  checksum;       /* Checksum       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	unsigned char           pad[22];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) /* Disable Channel */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) struct ncsi_cmd_dc_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	struct ncsi_cmd_pkt_hdr cmd;         /* Command header  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	unsigned char           reserved[3]; /* Reserved        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	unsigned char           ald;         /* Allow link down */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	__be32                  checksum;    /* Checksum        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	unsigned char           pad[22];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) /* Reset Channel */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) struct ncsi_cmd_rc_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	struct ncsi_cmd_pkt_hdr cmd;      /* Command header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	__be32                  reserved; /* Reserved       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	__be32                  checksum; /* Checksum       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	unsigned char           pad[22];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) /* AEN Enable */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) struct ncsi_cmd_ae_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	struct ncsi_cmd_pkt_hdr cmd;         /* Command header   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	unsigned char           reserved[3]; /* Reserved         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	unsigned char           mc_id;       /* MC ID            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	__be32                  mode;        /* AEN working mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	__be32                  checksum;    /* Checksum         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	unsigned char           pad[18];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) /* Set Link */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) struct ncsi_cmd_sl_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	struct ncsi_cmd_pkt_hdr cmd;      /* Command header    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	__be32                  mode;     /* Link working mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	__be32                  oem_mode; /* OEM link mode     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	__be32                  checksum; /* Checksum          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	unsigned char           pad[18];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) /* Set VLAN Filter */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) struct ncsi_cmd_svf_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	struct ncsi_cmd_pkt_hdr cmd;       /* Command header    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	__be16                  reserved;  /* Reserved          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	__be16                  vlan;      /* VLAN ID           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	__be16                  reserved1; /* Reserved          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	unsigned char           index;     /* VLAN table index  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	unsigned char           enable;    /* Enable or disable */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	__be32                  checksum;  /* Checksum          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	unsigned char           pad[18];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) /* Enable VLAN */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) struct ncsi_cmd_ev_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	struct ncsi_cmd_pkt_hdr cmd;         /* Command header   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	unsigned char           reserved[3]; /* Reserved         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	unsigned char           mode;        /* VLAN filter mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	__be32                  checksum;    /* Checksum         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	unsigned char           pad[22];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) /* Set MAC Address */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) struct ncsi_cmd_sma_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	struct ncsi_cmd_pkt_hdr cmd;      /* Command header          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	unsigned char           mac[6];   /* MAC address             */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	unsigned char           index;    /* MAC table index         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	unsigned char           at_e;     /* Addr type and operation */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	__be32                  checksum; /* Checksum                */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	unsigned char           pad[18];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) /* Enable Broadcast Filter */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) struct ncsi_cmd_ebf_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	struct ncsi_cmd_pkt_hdr cmd;      /* Command header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	__be32                  mode;     /* Filter mode    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	__be32                  checksum; /* Checksum       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	unsigned char           pad[22];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) /* Enable Global Multicast Filter */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) struct ncsi_cmd_egmf_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	struct ncsi_cmd_pkt_hdr cmd;      /* Command header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	__be32                  mode;     /* Global MC mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	__be32                  checksum; /* Checksum       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	unsigned char           pad[22];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) /* Set NCSI Flow Control */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) struct ncsi_cmd_snfc_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	struct ncsi_cmd_pkt_hdr cmd;         /* Command header    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	unsigned char           reserved[3]; /* Reserved          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	unsigned char           mode;        /* Flow control mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	__be32                  checksum;    /* Checksum          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	unsigned char           pad[22];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) /* OEM Request Command as per NCSI Specification */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) struct ncsi_cmd_oem_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	struct ncsi_cmd_pkt_hdr cmd;         /* Command header    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	__be32                  mfr_id;      /* Manufacture ID    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	unsigned char           data[];      /* OEM Payload Data  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) /* OEM Response Packet as per NCSI Specification */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) struct ncsi_rsp_oem_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	struct ncsi_rsp_pkt_hdr rsp;         /* Command header    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	__be32                  mfr_id;      /* Manufacture ID    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	unsigned char           data[];      /* Payload data      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) /* Mellanox Response Data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) struct ncsi_rsp_oem_mlx_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	unsigned char           cmd_rev;     /* Command Revision  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	unsigned char           cmd;         /* Command ID        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	unsigned char           param;       /* Parameter         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	unsigned char           optional;    /* Optional data     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	unsigned char           data[];      /* Data              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) /* Broadcom Response Data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) struct ncsi_rsp_oem_bcm_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	unsigned char           ver;         /* Payload Version   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	unsigned char           type;        /* OEM Command type  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	__be16                  len;         /* Payload Length    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	unsigned char           data[];      /* Cmd specific Data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) /* Get Link Status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) struct ncsi_rsp_gls_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	struct ncsi_rsp_pkt_hdr rsp;        /* Response header   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	__be32                  status;     /* Link status       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	__be32                  other;      /* Other indications */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	__be32                  oem_status; /* OEM link status   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	__be32                  checksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	unsigned char           pad[10];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) /* Get Version ID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) struct ncsi_rsp_gvi_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	struct ncsi_rsp_pkt_hdr rsp;          /* Response header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	__be32                  ncsi_version; /* NCSI version    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	unsigned char           reserved[3];  /* Reserved        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 	unsigned char           alpha2;       /* NCSI version    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	unsigned char           fw_name[12];  /* f/w name string */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	__be32                  fw_version;   /* f/w version     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	__be16                  pci_ids[4];   /* PCI IDs         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	__be32                  mf_id;        /* Manufacture ID  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	__be32                  checksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) /* Get Capabilities */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) struct ncsi_rsp_gc_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	struct ncsi_rsp_pkt_hdr rsp;         /* Response header   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	__be32                  cap;         /* Capabilities      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	__be32                  bc_cap;      /* Broadcast cap     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	__be32                  mc_cap;      /* Multicast cap     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	__be32                  buf_cap;     /* Buffering cap     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	__be32                  aen_cap;     /* AEN cap           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	unsigned char           vlan_cnt;    /* VLAN filter count */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	unsigned char           mixed_cnt;   /* Mix filter count  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	unsigned char           mc_cnt;      /* MC filter count   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	unsigned char           uc_cnt;      /* UC filter count   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	unsigned char           reserved[2]; /* Reserved          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	unsigned char           vlan_mode;   /* VLAN mode         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	unsigned char           channel_cnt; /* Channel count     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	__be32                  checksum;    /* Checksum          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) /* Get Parameters */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) struct ncsi_rsp_gp_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	struct ncsi_rsp_pkt_hdr rsp;          /* Response header       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	unsigned char           mac_cnt;      /* Number of MAC addr    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	unsigned char           reserved[2];  /* Reserved              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 	unsigned char           mac_enable;   /* MAC addr enable flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	unsigned char           vlan_cnt;     /* VLAN tag count        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	unsigned char           reserved1;    /* Reserved              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	__be16                  vlan_enable;  /* VLAN tag enable flags */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 	__be32                  link_mode;    /* Link setting          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	__be32                  bc_mode;      /* BC filter mode        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	__be32                  valid_modes;  /* Valid mode parameters */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 	unsigned char           vlan_mode;    /* VLAN mode             */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 	unsigned char           fc_mode;      /* Flow control mode     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 	unsigned char           reserved2[2]; /* Reserved              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 	__be32                  aen_mode;     /* AEN mode              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 	unsigned char           mac[6];       /* Supported MAC addr    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 	__be16                  vlan;         /* Supported VLAN tags   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 	__be32                  checksum;     /* Checksum              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) /* Get Controller Packet Statistics */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) struct ncsi_rsp_gcps_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) 	struct ncsi_rsp_pkt_hdr rsp;            /* Response header            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 	__be32                  cnt_hi;         /* Counter cleared            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	__be32                  cnt_lo;         /* Counter cleared            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) 	__be32                  rx_bytes;       /* Rx bytes                   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 	__be32                  tx_bytes;       /* Tx bytes                   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 	__be32                  rx_uc_pkts;     /* Rx UC packets              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 	__be32                  rx_mc_pkts;     /* Rx MC packets              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	__be32                  rx_bc_pkts;     /* Rx BC packets              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 	__be32                  tx_uc_pkts;     /* Tx UC packets              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 	__be32                  tx_mc_pkts;     /* Tx MC packets              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 	__be32                  tx_bc_pkts;     /* Tx BC packets              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	__be32                  fcs_err;        /* FCS errors                 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	__be32                  align_err;      /* Alignment errors           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 	__be32                  false_carrier;  /* False carrier detection    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 	__be32                  runt_pkts;      /* Rx runt packets            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 	__be32                  jabber_pkts;    /* Rx jabber packets          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 	__be32                  rx_pause_xon;   /* Rx pause XON frames        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	__be32                  rx_pause_xoff;  /* Rx XOFF frames             */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 	__be32                  tx_pause_xon;   /* Tx XON frames              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 	__be32                  tx_pause_xoff;  /* Tx XOFF frames             */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 	__be32                  tx_s_collision; /* Single collision frames    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 	__be32                  tx_m_collision; /* Multiple collision frames  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) 	__be32                  l_collision;    /* Late collision frames      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) 	__be32                  e_collision;    /* Excessive collision frames */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 	__be32                  rx_ctl_frames;  /* Rx control frames          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) 	__be32                  rx_64_frames;   /* Rx 64-bytes frames         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) 	__be32                  rx_127_frames;  /* Rx 65-127 bytes frames     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 	__be32                  rx_255_frames;  /* Rx 128-255 bytes frames    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) 	__be32                  rx_511_frames;  /* Rx 256-511 bytes frames    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) 	__be32                  rx_1023_frames; /* Rx 512-1023 bytes frames   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) 	__be32                  rx_1522_frames; /* Rx 1024-1522 bytes frames  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) 	__be32                  rx_9022_frames; /* Rx 1523-9022 bytes frames  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) 	__be32                  tx_64_frames;   /* Tx 64-bytes frames         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 	__be32                  tx_127_frames;  /* Tx 65-127 bytes frames     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 	__be32                  tx_255_frames;  /* Tx 128-255 bytes frames    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 	__be32                  tx_511_frames;  /* Tx 256-511 bytes frames    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) 	__be32                  tx_1023_frames; /* Tx 512-1023 bytes frames   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 	__be32                  tx_1522_frames; /* Tx 1024-1522 bytes frames  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) 	__be32                  tx_9022_frames; /* Tx 1523-9022 bytes frames  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) 	__be32                  rx_valid_bytes; /* Rx valid bytes             */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 	__be32                  rx_runt_pkts;   /* Rx error runt packets      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) 	__be32                  rx_jabber_pkts; /* Rx error jabber packets    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) 	__be32                  checksum;       /* Checksum                   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) /* Get NCSI Statistics */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) struct ncsi_rsp_gns_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 	struct ncsi_rsp_pkt_hdr rsp;           /* Response header         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 	__be32                  rx_cmds;       /* Rx NCSI commands        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) 	__be32                  dropped_cmds;  /* Dropped commands        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 	__be32                  cmd_type_errs; /* Command type errors     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) 	__be32                  cmd_csum_errs; /* Command checksum errors */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) 	__be32                  rx_pkts;       /* Rx NCSI packets         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) 	__be32                  tx_pkts;       /* Tx NCSI packets         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) 	__be32                  tx_aen_pkts;   /* Tx AEN packets          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) 	__be32                  checksum;      /* Checksum                */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) /* Get NCSI Pass-through Statistics */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) struct ncsi_rsp_gnpts_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) 	struct ncsi_rsp_pkt_hdr rsp;            /* Response header     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) 	__be32                  tx_pkts;        /* Tx packets          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) 	__be32                  tx_dropped;     /* Tx dropped packets  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 	__be32                  tx_channel_err; /* Tx channel errors   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 	__be32                  tx_us_err;      /* Tx undersize errors */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 	__be32                  rx_pkts;        /* Rx packets          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) 	__be32                  rx_dropped;     /* Rx dropped packets  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 	__be32                  rx_channel_err; /* Rx channel errors   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) 	__be32                  rx_us_err;      /* Rx undersize errors */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) 	__be32                  rx_os_err;      /* Rx oversize errors  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 	__be32                  checksum;       /* Checksum            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) /* Get package status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) struct ncsi_rsp_gps_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 	struct ncsi_rsp_pkt_hdr rsp;      /* Response header             */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) 	__be32                  status;   /* Hardware arbitration status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) 	__be32                  checksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) /* Get package UUID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) struct ncsi_rsp_gpuuid_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 	struct ncsi_rsp_pkt_hdr rsp;      /* Response header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 	unsigned char           uuid[16]; /* UUID            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 	__be32                  checksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) /* AEN: Link State Change */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) struct ncsi_aen_lsc_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) 	struct ncsi_aen_pkt_hdr aen;        /* AEN header      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 	__be32                  status;     /* Link status     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) 	__be32                  oem_status; /* OEM link status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) 	__be32                  checksum;   /* Checksum        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) 	unsigned char           pad[14];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) /* AEN: Configuration Required */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) struct ncsi_aen_cr_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) 	struct ncsi_aen_pkt_hdr aen;      /* AEN header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) 	__be32                  checksum; /* Checksum   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) 	unsigned char           pad[22];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) /* AEN: Host Network Controller Driver Status Change */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) struct ncsi_aen_hncdsc_pkt {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) 	struct ncsi_aen_pkt_hdr aen;      /* AEN header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) 	__be32                  status;   /* Status     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) 	__be32                  checksum; /* Checksum   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 	unsigned char           pad[18];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) /* NCSI packet revision */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) #define NCSI_PKT_REVISION	0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) /* NCSI packet commands */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) #define NCSI_PKT_CMD_CIS	0x00 /* Clear Initial State              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) #define NCSI_PKT_CMD_SP		0x01 /* Select Package                   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) #define NCSI_PKT_CMD_DP		0x02 /* Deselect Package                 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) #define NCSI_PKT_CMD_EC		0x03 /* Enable Channel                   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) #define NCSI_PKT_CMD_DC		0x04 /* Disable Channel                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) #define NCSI_PKT_CMD_RC		0x05 /* Reset Channel                    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) #define NCSI_PKT_CMD_ECNT	0x06 /* Enable Channel Network Tx        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) #define NCSI_PKT_CMD_DCNT	0x07 /* Disable Channel Network Tx       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) #define NCSI_PKT_CMD_AE		0x08 /* AEN Enable                       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) #define NCSI_PKT_CMD_SL		0x09 /* Set Link                         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) #define NCSI_PKT_CMD_GLS	0x0a /* Get Link                         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) #define NCSI_PKT_CMD_SVF	0x0b /* Set VLAN Filter                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) #define NCSI_PKT_CMD_EV		0x0c /* Enable VLAN                      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) #define NCSI_PKT_CMD_DV		0x0d /* Disable VLAN                     */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) #define NCSI_PKT_CMD_SMA	0x0e /* Set MAC address                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) #define NCSI_PKT_CMD_EBF	0x10 /* Enable Broadcast Filter          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) #define NCSI_PKT_CMD_DBF	0x11 /* Disable Broadcast Filter         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) #define NCSI_PKT_CMD_EGMF	0x12 /* Enable Global Multicast Filter   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) #define NCSI_PKT_CMD_DGMF	0x13 /* Disable Global Multicast Filter  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) #define NCSI_PKT_CMD_SNFC	0x14 /* Set NCSI Flow Control            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) #define NCSI_PKT_CMD_GVI	0x15 /* Get Version ID                   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) #define NCSI_PKT_CMD_GC		0x16 /* Get Capabilities                 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) #define NCSI_PKT_CMD_GP		0x17 /* Get Parameters                   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) #define NCSI_PKT_CMD_GCPS	0x18 /* Get Controller Packet Statistics */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) #define NCSI_PKT_CMD_GNS	0x19 /* Get NCSI Statistics              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) #define NCSI_PKT_CMD_GNPTS	0x1a /* Get NCSI Pass-throu Statistics   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) #define NCSI_PKT_CMD_GPS	0x1b /* Get package status               */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) #define NCSI_PKT_CMD_OEM	0x50 /* OEM                              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) #define NCSI_PKT_CMD_PLDM	0x51 /* PLDM request over NCSI over RBT  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) #define NCSI_PKT_CMD_GPUUID	0x52 /* Get package UUID                 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) #define NCSI_PKT_CMD_QPNPR	0x56 /* Query Pending NC PLDM request */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) #define NCSI_PKT_CMD_SNPR	0x57 /* Send NC PLDM Reply  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) /* NCSI packet responses */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) #define NCSI_PKT_RSP_CIS	(NCSI_PKT_CMD_CIS    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) #define NCSI_PKT_RSP_SP		(NCSI_PKT_CMD_SP     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) #define NCSI_PKT_RSP_DP		(NCSI_PKT_CMD_DP     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) #define NCSI_PKT_RSP_EC		(NCSI_PKT_CMD_EC     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) #define NCSI_PKT_RSP_DC		(NCSI_PKT_CMD_DC     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) #define NCSI_PKT_RSP_RC		(NCSI_PKT_CMD_RC     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) #define NCSI_PKT_RSP_ECNT	(NCSI_PKT_CMD_ECNT   + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) #define NCSI_PKT_RSP_DCNT	(NCSI_PKT_CMD_DCNT   + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) #define NCSI_PKT_RSP_AE		(NCSI_PKT_CMD_AE     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) #define NCSI_PKT_RSP_SL		(NCSI_PKT_CMD_SL     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) #define NCSI_PKT_RSP_GLS	(NCSI_PKT_CMD_GLS    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) #define NCSI_PKT_RSP_SVF	(NCSI_PKT_CMD_SVF    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) #define NCSI_PKT_RSP_EV		(NCSI_PKT_CMD_EV     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) #define NCSI_PKT_RSP_DV		(NCSI_PKT_CMD_DV     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) #define NCSI_PKT_RSP_SMA	(NCSI_PKT_CMD_SMA    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) #define NCSI_PKT_RSP_EBF	(NCSI_PKT_CMD_EBF    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) #define NCSI_PKT_RSP_DBF	(NCSI_PKT_CMD_DBF    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) #define NCSI_PKT_RSP_EGMF	(NCSI_PKT_CMD_EGMF   + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) #define NCSI_PKT_RSP_DGMF	(NCSI_PKT_CMD_DGMF   + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) #define NCSI_PKT_RSP_SNFC	(NCSI_PKT_CMD_SNFC   + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) #define NCSI_PKT_RSP_GVI	(NCSI_PKT_CMD_GVI    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) #define NCSI_PKT_RSP_GC		(NCSI_PKT_CMD_GC     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) #define NCSI_PKT_RSP_GP		(NCSI_PKT_CMD_GP     + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) #define NCSI_PKT_RSP_GCPS	(NCSI_PKT_CMD_GCPS   + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) #define NCSI_PKT_RSP_GNS	(NCSI_PKT_CMD_GNS    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) #define NCSI_PKT_RSP_GNPTS	(NCSI_PKT_CMD_GNPTS  + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) #define NCSI_PKT_RSP_GPS	(NCSI_PKT_CMD_GPS    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) #define NCSI_PKT_RSP_OEM	(NCSI_PKT_CMD_OEM    + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) #define NCSI_PKT_RSP_PLDM	(NCSI_PKT_CMD_PLDM   + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) #define NCSI_PKT_RSP_GPUUID	(NCSI_PKT_CMD_GPUUID + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) #define NCSI_PKT_RSP_QPNPR	(NCSI_PKT_CMD_QPNPR   + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) #define NCSI_PKT_RSP_SNPR	(NCSI_PKT_CMD_SNPR   + 0x80)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) /* NCSI response code/reason */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) #define NCSI_PKT_RSP_C_COMPLETED	0x0000 /* Command Completed        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) #define NCSI_PKT_RSP_C_FAILED		0x0001 /* Command Failed           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) #define NCSI_PKT_RSP_C_UNAVAILABLE	0x0002 /* Command Unavailable      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) #define NCSI_PKT_RSP_C_UNSUPPORTED	0x0003 /* Command Unsupported      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) #define NCSI_PKT_RSP_R_NO_ERROR		0x0000 /* No Error                 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) #define NCSI_PKT_RSP_R_INTERFACE	0x0001 /* Interface not ready      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) #define NCSI_PKT_RSP_R_PARAM		0x0002 /* Invalid Parameter        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) #define NCSI_PKT_RSP_R_CHANNEL		0x0003 /* Channel not Ready        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) #define NCSI_PKT_RSP_R_PACKAGE		0x0004 /* Package not Ready        */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) #define NCSI_PKT_RSP_R_LENGTH		0x0005 /* Invalid payload length   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) #define NCSI_PKT_RSP_R_UNKNOWN		0x7fff /* Command type unsupported */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) /* NCSI AEN packet type */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) #define NCSI_PKT_AEN		0xFF /* AEN Packet               */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) #define NCSI_PKT_AEN_LSC	0x00 /* Link status change       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) #define NCSI_PKT_AEN_CR		0x01 /* Configuration required   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) #define NCSI_PKT_AEN_HNCDSC	0x02 /* HNC driver status change */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) #endif /* __NCSI_PKT_H__ */