18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * File Name: 38c2ecf20Sopenharmony_ci * defxx.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright Information: 68c2ecf20Sopenharmony_ci * Copyright Digital Equipment Corporation 1996. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * This software may be used and distributed according to the terms of 98c2ecf20Sopenharmony_ci * the GNU General Public License, incorporated herein by reference. 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Abstract: 128c2ecf20Sopenharmony_ci * Contains all definitions specified by port specification and required 138c2ecf20Sopenharmony_ci * by the defxx.c driver. 148c2ecf20Sopenharmony_ci * 158c2ecf20Sopenharmony_ci * The original author: 168c2ecf20Sopenharmony_ci * LVS Lawrence V. Stefani <lstefani@yahoo.com> 178c2ecf20Sopenharmony_ci * 188c2ecf20Sopenharmony_ci * Maintainers: 198c2ecf20Sopenharmony_ci * macro Maciej W. Rozycki <macro@linux-mips.org> 208c2ecf20Sopenharmony_ci * 218c2ecf20Sopenharmony_ci * Modification History: 228c2ecf20Sopenharmony_ci * Date Name Description 238c2ecf20Sopenharmony_ci * 16-Aug-96 LVS Created. 248c2ecf20Sopenharmony_ci * 09-Sep-96 LVS Added group_prom field. Moved read/write I/O 258c2ecf20Sopenharmony_ci * macros to DEFXX.C. 268c2ecf20Sopenharmony_ci * 12-Sep-96 LVS Removed packet request header pointers. 278c2ecf20Sopenharmony_ci * 04 Aug 2003 macro Converted to the DMA API. 288c2ecf20Sopenharmony_ci * 23 Oct 2006 macro Big-endian host support. 298c2ecf20Sopenharmony_ci * 14 Dec 2006 macro TURBOchannel support. 308c2ecf20Sopenharmony_ci */ 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#ifndef _DEFXX_H_ 338c2ecf20Sopenharmony_ci#define _DEFXX_H_ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci/* Define basic types for unsigned chars, shorts, longs */ 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_citypedef u8 PI_UINT8; 388c2ecf20Sopenharmony_citypedef u16 PI_UINT16; 398c2ecf20Sopenharmony_citypedef u32 PI_UINT32; 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci/* Define general structures */ 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_citypedef struct /* 64-bit counter */ 448c2ecf20Sopenharmony_ci { 458c2ecf20Sopenharmony_ci PI_UINT32 ms; 468c2ecf20Sopenharmony_ci PI_UINT32 ls; 478c2ecf20Sopenharmony_ci } PI_CNTR; 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_citypedef struct /* LAN address */ 508c2ecf20Sopenharmony_ci { 518c2ecf20Sopenharmony_ci PI_UINT32 lwrd_0; 528c2ecf20Sopenharmony_ci PI_UINT32 lwrd_1; 538c2ecf20Sopenharmony_ci } PI_LAN_ADDR; 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_citypedef struct /* Station ID address */ 568c2ecf20Sopenharmony_ci { 578c2ecf20Sopenharmony_ci PI_UINT32 octet_7_4; 588c2ecf20Sopenharmony_ci PI_UINT32 octet_3_0; 598c2ecf20Sopenharmony_ci } PI_STATION_ID; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci/* Define general constants */ 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#define PI_ALIGN_K_DESC_BLK 8192 /* Descriptor block boundary */ 658c2ecf20Sopenharmony_ci#define PI_ALIGN_K_CONS_BLK 64 /* Consumer block boundary */ 668c2ecf20Sopenharmony_ci#define PI_ALIGN_K_CMD_REQ_BUFF 128 /* Xmt Command que buffer alignment */ 678c2ecf20Sopenharmony_ci#define PI_ALIGN_K_CMD_RSP_BUFF 128 /* Rcv Command que buffer alignment */ 688c2ecf20Sopenharmony_ci#define PI_ALIGN_K_UNSOL_BUFF 128 /* Unsol que buffer alignment */ 698c2ecf20Sopenharmony_ci#define PI_ALIGN_K_XMT_DATA_BUFF 0 /* Xmt data que buffer alignment */ 708c2ecf20Sopenharmony_ci#define PI_ALIGN_K_RCV_DATA_BUFF 128 /* Rcv que buffer alignment */ 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci/* Define PHY index values */ 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci#define PI_PHY_K_S 0 /* Index to S phy */ 758c2ecf20Sopenharmony_ci#define PI_PHY_K_A 0 /* Index to A phy */ 768c2ecf20Sopenharmony_ci#define PI_PHY_K_B 1 /* Index to B phy */ 778c2ecf20Sopenharmony_ci#define PI_PHY_K_MAX 2 /* Max number of phys */ 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci/* Define FMC descriptor fields */ 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_SOP 31 828c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_EOP 30 838c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_FSC 27 848c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_FSB_ERROR 26 858c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_FSB_ADDR_RECOG 25 868c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_FSB_ADDR_COPIED 24 878c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_FSB 22 888c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_RCC_FLUSH 21 898c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_RCC_CRC 20 908c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_RCC_RRR 17 918c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_RCC_DD 15 928c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_RCC_SS 13 938c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_RCC 13 948c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_V_LEN 0 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_SOP 0x80000000 978c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_EOP 0x40000000 988c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_FSC 0x38000000 998c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_FSB_ERROR 0x04000000 1008c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_FSB_ADDR_RECOG 0x02000000 1018c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_FSB_ADDR_COPIED 0x01000000 1028c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_FSB 0x07C00000 1038c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_RCC_FLUSH 0x00200000 1048c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_RCC_CRC 0x00100000 1058c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_RCC_RRR 0x000E0000 1068c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_RCC_DD 0x00018000 1078c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_RCC_SS 0x00006000 1088c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_RCC 0x003FE000 1098c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_M_LEN 0x00001FFF 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_RCC_FMC_INT_ERR 0x01AA 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_RRR_SUCCESS 0x00 1148c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_RRR_SA_MATCH 0x01 1158c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_RRR_DA_MATCH 0x02 1168c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_RRR_FMC_ABORT 0x03 1178c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_RRR_LENGTH_BAD 0x04 1188c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_RRR_FRAGMENT 0x05 1198c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_RRR_FORMAT_ERR 0x06 1208c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_RRR_MAC_RESET 0x07 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_DD_NO_MATCH 0x0 1238c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_DD_PROMISCUOUS 0x1 1248c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_DD_CAM_MATCH 0x2 1258c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_DD_LOCAL_MATCH 0x3 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_SS_NO_MATCH 0x0 1288c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_SS_BRIDGE_MATCH 0x1 1298c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_SS_NOT_POSSIBLE 0x2 1308c2ecf20Sopenharmony_ci#define PI_FMC_DESCR_K_SS_LOCAL_MATCH 0x3 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci/* Define some max buffer sizes */ 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci#define PI_CMD_REQ_K_SIZE_MAX 512 1358c2ecf20Sopenharmony_ci#define PI_CMD_RSP_K_SIZE_MAX 512 1368c2ecf20Sopenharmony_ci#define PI_UNSOL_K_SIZE_MAX 512 1378c2ecf20Sopenharmony_ci#define PI_SMT_HOST_K_SIZE_MAX 4608 /* 4 1/2 K */ 1388c2ecf20Sopenharmony_ci#define PI_RCV_DATA_K_SIZE_MAX 4608 /* 4 1/2 K */ 1398c2ecf20Sopenharmony_ci#define PI_XMT_DATA_K_SIZE_MAX 4608 /* 4 1/2 K */ 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci/* Define adapter states */ 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci#define PI_STATE_K_RESET 0 1448c2ecf20Sopenharmony_ci#define PI_STATE_K_UPGRADE 1 1458c2ecf20Sopenharmony_ci#define PI_STATE_K_DMA_UNAVAIL 2 1468c2ecf20Sopenharmony_ci#define PI_STATE_K_DMA_AVAIL 3 1478c2ecf20Sopenharmony_ci#define PI_STATE_K_LINK_AVAIL 4 1488c2ecf20Sopenharmony_ci#define PI_STATE_K_LINK_UNAVAIL 5 1498c2ecf20Sopenharmony_ci#define PI_STATE_K_HALTED 6 1508c2ecf20Sopenharmony_ci#define PI_STATE_K_RING_MEMBER 7 1518c2ecf20Sopenharmony_ci#define PI_STATE_K_NUMBER 8 1528c2ecf20Sopenharmony_ci 1538c2ecf20Sopenharmony_ci/* Define codes for command type */ 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ci#define PI_CMD_K_START 0x00 1568c2ecf20Sopenharmony_ci#define PI_CMD_K_FILTERS_SET 0x01 1578c2ecf20Sopenharmony_ci#define PI_CMD_K_FILTERS_GET 0x02 1588c2ecf20Sopenharmony_ci#define PI_CMD_K_CHARS_SET 0x03 1598c2ecf20Sopenharmony_ci#define PI_CMD_K_STATUS_CHARS_GET 0x04 1608c2ecf20Sopenharmony_ci#define PI_CMD_K_CNTRS_GET 0x05 1618c2ecf20Sopenharmony_ci#define PI_CMD_K_CNTRS_SET 0x06 1628c2ecf20Sopenharmony_ci#define PI_CMD_K_ADDR_FILTER_SET 0x07 1638c2ecf20Sopenharmony_ci#define PI_CMD_K_ADDR_FILTER_GET 0x08 1648c2ecf20Sopenharmony_ci#define PI_CMD_K_ERROR_LOG_CLEAR 0x09 1658c2ecf20Sopenharmony_ci#define PI_CMD_K_ERROR_LOG_GET 0x0A 1668c2ecf20Sopenharmony_ci#define PI_CMD_K_FDDI_MIB_GET 0x0B 1678c2ecf20Sopenharmony_ci#define PI_CMD_K_DEC_EXT_MIB_GET 0x0C 1688c2ecf20Sopenharmony_ci#define PI_CMD_K_DEVICE_SPECIFIC_GET 0x0D 1698c2ecf20Sopenharmony_ci#define PI_CMD_K_SNMP_SET 0x0E 1708c2ecf20Sopenharmony_ci#define PI_CMD_K_UNSOL_TEST 0x0F 1718c2ecf20Sopenharmony_ci#define PI_CMD_K_SMT_MIB_GET 0x10 1728c2ecf20Sopenharmony_ci#define PI_CMD_K_SMT_MIB_SET 0x11 1738c2ecf20Sopenharmony_ci#define PI_CMD_K_MAX 0x11 /* Must match last */ 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci/* Define item codes for Chars_Set and Filters_Set commands */ 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ci#define PI_ITEM_K_EOL 0x00 /* End-of-Item list */ 1788c2ecf20Sopenharmony_ci#define PI_ITEM_K_T_REQ 0x01 /* DECnet T_REQ */ 1798c2ecf20Sopenharmony_ci#define PI_ITEM_K_TVX 0x02 /* DECnet TVX */ 1808c2ecf20Sopenharmony_ci#define PI_ITEM_K_RESTRICTED_TOKEN 0x03 /* DECnet Restricted Token */ 1818c2ecf20Sopenharmony_ci#define PI_ITEM_K_LEM_THRESHOLD 0x04 /* DECnet LEM Threshold */ 1828c2ecf20Sopenharmony_ci#define PI_ITEM_K_RING_PURGER 0x05 /* DECnet Ring Purger Enable */ 1838c2ecf20Sopenharmony_ci#define PI_ITEM_K_CNTR_INTERVAL 0x06 /* Chars_Set */ 1848c2ecf20Sopenharmony_ci#define PI_ITEM_K_IND_GROUP_PROM 0x07 /* Filters_Set */ 1858c2ecf20Sopenharmony_ci#define PI_ITEM_K_GROUP_PROM 0x08 /* Filters_Set */ 1868c2ecf20Sopenharmony_ci#define PI_ITEM_K_BROADCAST 0x09 /* Filters_Set */ 1878c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_PROM 0x0A /* Filters_Set */ 1888c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_USER 0x0B /* Filters_Set */ 1898c2ecf20Sopenharmony_ci#define PI_ITEM_K_RESERVED 0x0C /* Filters_Set */ 1908c2ecf20Sopenharmony_ci#define PI_ITEM_K_IMPLEMENTOR 0x0D /* Filters_Set */ 1918c2ecf20Sopenharmony_ci#define PI_ITEM_K_LOOPBACK_MODE 0x0E /* Chars_Set */ 1928c2ecf20Sopenharmony_ci#define PI_ITEM_K_CONFIG_POLICY 0x10 /* SMTConfigPolicy */ 1938c2ecf20Sopenharmony_ci#define PI_ITEM_K_CON_POLICY 0x11 /* SMTConnectionPolicy */ 1948c2ecf20Sopenharmony_ci#define PI_ITEM_K_T_NOTIFY 0x12 /* SMTTNotify */ 1958c2ecf20Sopenharmony_ci#define PI_ITEM_K_STATION_ACTION 0x13 /* SMTStationAction */ 1968c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_PATHS_REQ 0x15 /* MACPathsRequested */ 1978c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_ACTION 0x17 /* MACAction */ 1988c2ecf20Sopenharmony_ci#define PI_ITEM_K_CON_POLICIES 0x18 /* PORTConnectionPolicies */ 1998c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_PATHS_REQ 0x19 /* PORTPathsRequested */ 2008c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_LOOP_TIME 0x1A /* PORTMACLoopTime */ 2018c2ecf20Sopenharmony_ci#define PI_ITEM_K_TB_MAX 0x1B /* PORTTBMax */ 2028c2ecf20Sopenharmony_ci#define PI_ITEM_K_LER_CUTOFF 0x1C /* PORTLerCutoff */ 2038c2ecf20Sopenharmony_ci#define PI_ITEM_K_LER_ALARM 0x1D /* PORTLerAlarm */ 2048c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_ACTION 0x1E /* PORTAction */ 2058c2ecf20Sopenharmony_ci#define PI_ITEM_K_FLUSH_TIME 0x20 /* Chars_Set */ 2068c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_T_REQ 0x29 /* MACTReq */ 2078c2ecf20Sopenharmony_ci#define PI_ITEM_K_EMAC_RING_PURGER 0x2A /* eMACRingPurgerEnable */ 2088c2ecf20Sopenharmony_ci#define PI_ITEM_K_EMAC_RTOKEN_TIMEOUT 0x2B /* eMACRestrictedTokenTimeout */ 2098c2ecf20Sopenharmony_ci#define PI_ITEM_K_FDX_ENB_DIS 0x2C /* eFDXEnable */ 2108c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAX 0x2C /* Must equal high item */ 2118c2ecf20Sopenharmony_ci 2128c2ecf20Sopenharmony_ci/* Values for some of the items */ 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci#define PI_K_FALSE 0 /* Generic false */ 2158c2ecf20Sopenharmony_ci#define PI_K_TRUE 1 /* Generic true */ 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_ci#define PI_SNMP_K_TRUE 1 /* SNMP true/false values */ 2188c2ecf20Sopenharmony_ci#define PI_SNMP_K_FALSE 2 2198c2ecf20Sopenharmony_ci 2208c2ecf20Sopenharmony_ci#define PI_FSTATE_K_BLOCK 0 /* Filter State */ 2218c2ecf20Sopenharmony_ci#define PI_FSTATE_K_PASS 1 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ci/* Define command return codes */ 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci#define PI_RSP_K_SUCCESS 0x00 2268c2ecf20Sopenharmony_ci#define PI_RSP_K_FAILURE 0x01 2278c2ecf20Sopenharmony_ci#define PI_RSP_K_WARNING 0x02 2288c2ecf20Sopenharmony_ci#define PI_RSP_K_LOOP_MODE_BAD 0x03 2298c2ecf20Sopenharmony_ci#define PI_RSP_K_ITEM_CODE_BAD 0x04 2308c2ecf20Sopenharmony_ci#define PI_RSP_K_TVX_BAD 0x05 2318c2ecf20Sopenharmony_ci#define PI_RSP_K_TREQ_BAD 0x06 2328c2ecf20Sopenharmony_ci#define PI_RSP_K_TOKEN_BAD 0x07 2338c2ecf20Sopenharmony_ci#define PI_RSP_K_NO_EOL 0x0C 2348c2ecf20Sopenharmony_ci#define PI_RSP_K_FILTER_STATE_BAD 0x0D 2358c2ecf20Sopenharmony_ci#define PI_RSP_K_CMD_TYPE_BAD 0x0E 2368c2ecf20Sopenharmony_ci#define PI_RSP_K_ADAPTER_STATE_BAD 0x0F 2378c2ecf20Sopenharmony_ci#define PI_RSP_K_RING_PURGER_BAD 0x10 2388c2ecf20Sopenharmony_ci#define PI_RSP_K_LEM_THRESHOLD_BAD 0x11 2398c2ecf20Sopenharmony_ci#define PI_RSP_K_LOOP_NOT_SUPPORTED 0x12 2408c2ecf20Sopenharmony_ci#define PI_RSP_K_FLUSH_TIME_BAD 0x13 2418c2ecf20Sopenharmony_ci#define PI_RSP_K_NOT_IMPLEMENTED 0x14 2428c2ecf20Sopenharmony_ci#define PI_RSP_K_CONFIG_POLICY_BAD 0x15 2438c2ecf20Sopenharmony_ci#define PI_RSP_K_STATION_ACTION_BAD 0x16 2448c2ecf20Sopenharmony_ci#define PI_RSP_K_MAC_ACTION_BAD 0x17 2458c2ecf20Sopenharmony_ci#define PI_RSP_K_CON_POLICIES_BAD 0x18 2468c2ecf20Sopenharmony_ci#define PI_RSP_K_MAC_LOOP_TIME_BAD 0x19 2478c2ecf20Sopenharmony_ci#define PI_RSP_K_TB_MAX_BAD 0x1A 2488c2ecf20Sopenharmony_ci#define PI_RSP_K_LER_CUTOFF_BAD 0x1B 2498c2ecf20Sopenharmony_ci#define PI_RSP_K_LER_ALARM_BAD 0x1C 2508c2ecf20Sopenharmony_ci#define PI_RSP_K_MAC_PATHS_REQ_BAD 0x1D 2518c2ecf20Sopenharmony_ci#define PI_RSP_K_MAC_T_REQ_BAD 0x1E 2528c2ecf20Sopenharmony_ci#define PI_RSP_K_EMAC_RING_PURGER_BAD 0x1F 2538c2ecf20Sopenharmony_ci#define PI_RSP_K_EMAC_RTOKEN_TIME_BAD 0x20 2548c2ecf20Sopenharmony_ci#define PI_RSP_K_NO_SUCH_ENTRY 0x21 2558c2ecf20Sopenharmony_ci#define PI_RSP_K_T_NOTIFY_BAD 0x22 2568c2ecf20Sopenharmony_ci#define PI_RSP_K_TR_MAX_EXP_BAD 0x23 2578c2ecf20Sopenharmony_ci#define PI_RSP_K_MAC_FRM_ERR_THR_BAD 0x24 2588c2ecf20Sopenharmony_ci#define PI_RSP_K_MAX_T_REQ_BAD 0x25 2598c2ecf20Sopenharmony_ci#define PI_RSP_K_FDX_ENB_DIS_BAD 0x26 2608c2ecf20Sopenharmony_ci#define PI_RSP_K_ITEM_INDEX_BAD 0x27 2618c2ecf20Sopenharmony_ci#define PI_RSP_K_PORT_ACTION_BAD 0x28 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ci/* Commonly used structures */ 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_citypedef struct /* Item list */ 2668c2ecf20Sopenharmony_ci { 2678c2ecf20Sopenharmony_ci PI_UINT32 item_code; 2688c2ecf20Sopenharmony_ci PI_UINT32 value; 2698c2ecf20Sopenharmony_ci } PI_ITEM_LIST; 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_citypedef struct /* Response header */ 2728c2ecf20Sopenharmony_ci { 2738c2ecf20Sopenharmony_ci PI_UINT32 reserved; 2748c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 2758c2ecf20Sopenharmony_ci PI_UINT32 status; 2768c2ecf20Sopenharmony_ci } PI_RSP_HEADER; 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci/* Start Command */ 2808c2ecf20Sopenharmony_ci 2818c2ecf20Sopenharmony_citypedef struct 2828c2ecf20Sopenharmony_ci { 2838c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 2848c2ecf20Sopenharmony_ci } PI_CMD_START_REQ; 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci/* Start Response */ 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_citypedef struct 2898c2ecf20Sopenharmony_ci { 2908c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 2918c2ecf20Sopenharmony_ci } PI_CMD_START_RSP; 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_ci/* Filters_Set Request */ 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci#define PI_CMD_FILTERS_SET_K_ITEMS_MAX 63 /* Fits in a 512 byte buffer */ 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_citypedef struct 2988c2ecf20Sopenharmony_ci { 2998c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 3008c2ecf20Sopenharmony_ci PI_ITEM_LIST item[PI_CMD_FILTERS_SET_K_ITEMS_MAX]; 3018c2ecf20Sopenharmony_ci } PI_CMD_FILTERS_SET_REQ; 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_ci/* Filters_Set Response */ 3048c2ecf20Sopenharmony_ci 3058c2ecf20Sopenharmony_citypedef struct 3068c2ecf20Sopenharmony_ci { 3078c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 3088c2ecf20Sopenharmony_ci } PI_CMD_FILTERS_SET_RSP; 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_ci/* Filters_Get Request */ 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_citypedef struct 3138c2ecf20Sopenharmony_ci { 3148c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 3158c2ecf20Sopenharmony_ci } PI_CMD_FILTERS_GET_REQ; 3168c2ecf20Sopenharmony_ci 3178c2ecf20Sopenharmony_ci/* Filters_Get Response */ 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_citypedef struct 3208c2ecf20Sopenharmony_ci { 3218c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 3228c2ecf20Sopenharmony_ci PI_UINT32 ind_group_prom; 3238c2ecf20Sopenharmony_ci PI_UINT32 group_prom; 3248c2ecf20Sopenharmony_ci PI_UINT32 broadcast_all; 3258c2ecf20Sopenharmony_ci PI_UINT32 smt_all; 3268c2ecf20Sopenharmony_ci PI_UINT32 smt_user; 3278c2ecf20Sopenharmony_ci PI_UINT32 reserved_all; 3288c2ecf20Sopenharmony_ci PI_UINT32 implementor_all; 3298c2ecf20Sopenharmony_ci } PI_CMD_FILTERS_GET_RSP; 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_ci/* Chars_Set Request */ 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci#define PI_CMD_CHARS_SET_K_ITEMS_MAX 42 /* Fits in a 512 byte buffer */ 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_citypedef struct 3378c2ecf20Sopenharmony_ci { 3388c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 3398c2ecf20Sopenharmony_ci struct /* Item list */ 3408c2ecf20Sopenharmony_ci { 3418c2ecf20Sopenharmony_ci PI_UINT32 item_code; 3428c2ecf20Sopenharmony_ci PI_UINT32 value; 3438c2ecf20Sopenharmony_ci PI_UINT32 item_index; 3448c2ecf20Sopenharmony_ci } item[PI_CMD_CHARS_SET_K_ITEMS_MAX]; 3458c2ecf20Sopenharmony_ci } PI_CMD_CHARS_SET_REQ; 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ci/* Chars_Set Response */ 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_citypedef struct 3508c2ecf20Sopenharmony_ci { 3518c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 3528c2ecf20Sopenharmony_ci } PI_CMD_CHARS_SET_RSP; 3538c2ecf20Sopenharmony_ci 3548c2ecf20Sopenharmony_ci 3558c2ecf20Sopenharmony_ci/* SNMP_Set Request */ 3568c2ecf20Sopenharmony_ci 3578c2ecf20Sopenharmony_ci#define PI_CMD_SNMP_SET_K_ITEMS_MAX 42 /* Fits in a 512 byte buffer */ 3588c2ecf20Sopenharmony_ci 3598c2ecf20Sopenharmony_citypedef struct 3608c2ecf20Sopenharmony_ci { 3618c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 3628c2ecf20Sopenharmony_ci struct /* Item list */ 3638c2ecf20Sopenharmony_ci { 3648c2ecf20Sopenharmony_ci PI_UINT32 item_code; 3658c2ecf20Sopenharmony_ci PI_UINT32 value; 3668c2ecf20Sopenharmony_ci PI_UINT32 item_index; 3678c2ecf20Sopenharmony_ci } item[PI_CMD_SNMP_SET_K_ITEMS_MAX]; 3688c2ecf20Sopenharmony_ci } PI_CMD_SNMP_SET_REQ; 3698c2ecf20Sopenharmony_ci 3708c2ecf20Sopenharmony_ci/* SNMP_Set Response */ 3718c2ecf20Sopenharmony_ci 3728c2ecf20Sopenharmony_citypedef struct 3738c2ecf20Sopenharmony_ci { 3748c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 3758c2ecf20Sopenharmony_ci } PI_CMD_SNMP_SET_RSP; 3768c2ecf20Sopenharmony_ci 3778c2ecf20Sopenharmony_ci 3788c2ecf20Sopenharmony_ci/* SMT_MIB_Set Request */ 3798c2ecf20Sopenharmony_ci 3808c2ecf20Sopenharmony_ci#define PI_CMD_SMT_MIB_SET_K_ITEMS_MAX 42 /* Max number of items */ 3818c2ecf20Sopenharmony_ci 3828c2ecf20Sopenharmony_citypedef struct 3838c2ecf20Sopenharmony_ci { 3848c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 3858c2ecf20Sopenharmony_ci struct 3868c2ecf20Sopenharmony_ci { 3878c2ecf20Sopenharmony_ci PI_UINT32 item_code; 3888c2ecf20Sopenharmony_ci PI_UINT32 value; 3898c2ecf20Sopenharmony_ci PI_UINT32 item_index; 3908c2ecf20Sopenharmony_ci } item[PI_CMD_SMT_MIB_SET_K_ITEMS_MAX]; 3918c2ecf20Sopenharmony_ci } PI_CMD_SMT_MIB_SET_REQ; 3928c2ecf20Sopenharmony_ci 3938c2ecf20Sopenharmony_ci/* SMT_MIB_Set Response */ 3948c2ecf20Sopenharmony_ci 3958c2ecf20Sopenharmony_citypedef struct 3968c2ecf20Sopenharmony_ci { 3978c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 3988c2ecf20Sopenharmony_ci } PI_CMD_SMT_MIB_SET_RSP; 3998c2ecf20Sopenharmony_ci 4008c2ecf20Sopenharmony_ci/* SMT_MIB_Get Request */ 4018c2ecf20Sopenharmony_ci 4028c2ecf20Sopenharmony_citypedef struct 4038c2ecf20Sopenharmony_ci { 4048c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 4058c2ecf20Sopenharmony_ci } PI_CMD_SMT_MIB_GET_REQ; 4068c2ecf20Sopenharmony_ci 4078c2ecf20Sopenharmony_ci/* SMT_MIB_Get Response */ 4088c2ecf20Sopenharmony_ci 4098c2ecf20Sopenharmony_citypedef struct /* Refer to ANSI FDDI SMT Rev. 7.3 */ 4108c2ecf20Sopenharmony_ci { 4118c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 4128c2ecf20Sopenharmony_ci 4138c2ecf20Sopenharmony_ci /* SMT GROUP */ 4148c2ecf20Sopenharmony_ci 4158c2ecf20Sopenharmony_ci PI_STATION_ID smt_station_id; 4168c2ecf20Sopenharmony_ci PI_UINT32 smt_op_version_id; 4178c2ecf20Sopenharmony_ci PI_UINT32 smt_hi_version_id; 4188c2ecf20Sopenharmony_ci PI_UINT32 smt_lo_version_id; 4198c2ecf20Sopenharmony_ci PI_UINT32 smt_user_data[8]; 4208c2ecf20Sopenharmony_ci PI_UINT32 smt_mib_version_id; 4218c2ecf20Sopenharmony_ci PI_UINT32 smt_mac_ct; 4228c2ecf20Sopenharmony_ci PI_UINT32 smt_non_master_ct; 4238c2ecf20Sopenharmony_ci PI_UINT32 smt_master_ct; 4248c2ecf20Sopenharmony_ci PI_UINT32 smt_available_paths; 4258c2ecf20Sopenharmony_ci PI_UINT32 smt_config_capabilities; 4268c2ecf20Sopenharmony_ci PI_UINT32 smt_config_policy; 4278c2ecf20Sopenharmony_ci PI_UINT32 smt_connection_policy; 4288c2ecf20Sopenharmony_ci PI_UINT32 smt_t_notify; 4298c2ecf20Sopenharmony_ci PI_UINT32 smt_stat_rpt_policy; 4308c2ecf20Sopenharmony_ci PI_UINT32 smt_trace_max_expiration; 4318c2ecf20Sopenharmony_ci PI_UINT32 smt_bypass_present; 4328c2ecf20Sopenharmony_ci PI_UINT32 smt_ecm_state; 4338c2ecf20Sopenharmony_ci PI_UINT32 smt_cf_state; 4348c2ecf20Sopenharmony_ci PI_UINT32 smt_remote_disconnect_flag; 4358c2ecf20Sopenharmony_ci PI_UINT32 smt_station_status; 4368c2ecf20Sopenharmony_ci PI_UINT32 smt_peer_wrap_flag; 4378c2ecf20Sopenharmony_ci PI_CNTR smt_msg_time_stamp; 4388c2ecf20Sopenharmony_ci PI_CNTR smt_transition_time_stamp; 4398c2ecf20Sopenharmony_ci 4408c2ecf20Sopenharmony_ci /* MAC GROUP */ 4418c2ecf20Sopenharmony_ci 4428c2ecf20Sopenharmony_ci PI_UINT32 mac_frame_status_functions; 4438c2ecf20Sopenharmony_ci PI_UINT32 mac_t_max_capability; 4448c2ecf20Sopenharmony_ci PI_UINT32 mac_tvx_capability; 4458c2ecf20Sopenharmony_ci PI_UINT32 mac_available_paths; 4468c2ecf20Sopenharmony_ci PI_UINT32 mac_current_path; 4478c2ecf20Sopenharmony_ci PI_LAN_ADDR mac_upstream_nbr; 4488c2ecf20Sopenharmony_ci PI_LAN_ADDR mac_downstream_nbr; 4498c2ecf20Sopenharmony_ci PI_LAN_ADDR mac_old_upstream_nbr; 4508c2ecf20Sopenharmony_ci PI_LAN_ADDR mac_old_downstream_nbr; 4518c2ecf20Sopenharmony_ci PI_UINT32 mac_dup_address_test; 4528c2ecf20Sopenharmony_ci PI_UINT32 mac_requested_paths; 4538c2ecf20Sopenharmony_ci PI_UINT32 mac_downstream_port_type; 4548c2ecf20Sopenharmony_ci PI_LAN_ADDR mac_smt_address; 4558c2ecf20Sopenharmony_ci PI_UINT32 mac_t_req; 4568c2ecf20Sopenharmony_ci PI_UINT32 mac_t_neg; 4578c2ecf20Sopenharmony_ci PI_UINT32 mac_t_max; 4588c2ecf20Sopenharmony_ci PI_UINT32 mac_tvx_value; 4598c2ecf20Sopenharmony_ci PI_UINT32 mac_frame_error_threshold; 4608c2ecf20Sopenharmony_ci PI_UINT32 mac_frame_error_ratio; 4618c2ecf20Sopenharmony_ci PI_UINT32 mac_rmt_state; 4628c2ecf20Sopenharmony_ci PI_UINT32 mac_da_flag; 4638c2ecf20Sopenharmony_ci PI_UINT32 mac_unda_flag; 4648c2ecf20Sopenharmony_ci PI_UINT32 mac_frame_error_flag; 4658c2ecf20Sopenharmony_ci PI_UINT32 mac_ma_unitdata_available; 4668c2ecf20Sopenharmony_ci PI_UINT32 mac_hardware_present; 4678c2ecf20Sopenharmony_ci PI_UINT32 mac_ma_unitdata_enable; 4688c2ecf20Sopenharmony_ci 4698c2ecf20Sopenharmony_ci /* PATH GROUP */ 4708c2ecf20Sopenharmony_ci 4718c2ecf20Sopenharmony_ci PI_UINT32 path_configuration[8]; 4728c2ecf20Sopenharmony_ci PI_UINT32 path_tvx_lower_bound; 4738c2ecf20Sopenharmony_ci PI_UINT32 path_t_max_lower_bound; 4748c2ecf20Sopenharmony_ci PI_UINT32 path_max_t_req; 4758c2ecf20Sopenharmony_ci 4768c2ecf20Sopenharmony_ci /* PORT GROUP */ 4778c2ecf20Sopenharmony_ci 4788c2ecf20Sopenharmony_ci PI_UINT32 port_my_type[PI_PHY_K_MAX]; 4798c2ecf20Sopenharmony_ci PI_UINT32 port_neighbor_type[PI_PHY_K_MAX]; 4808c2ecf20Sopenharmony_ci PI_UINT32 port_connection_policies[PI_PHY_K_MAX]; 4818c2ecf20Sopenharmony_ci PI_UINT32 port_mac_indicated[PI_PHY_K_MAX]; 4828c2ecf20Sopenharmony_ci PI_UINT32 port_current_path[PI_PHY_K_MAX]; 4838c2ecf20Sopenharmony_ci PI_UINT32 port_requested_paths[PI_PHY_K_MAX]; 4848c2ecf20Sopenharmony_ci PI_UINT32 port_mac_placement[PI_PHY_K_MAX]; 4858c2ecf20Sopenharmony_ci PI_UINT32 port_available_paths[PI_PHY_K_MAX]; 4868c2ecf20Sopenharmony_ci PI_UINT32 port_pmd_class[PI_PHY_K_MAX]; 4878c2ecf20Sopenharmony_ci PI_UINT32 port_connection_capabilities[PI_PHY_K_MAX]; 4888c2ecf20Sopenharmony_ci PI_UINT32 port_bs_flag[PI_PHY_K_MAX]; 4898c2ecf20Sopenharmony_ci PI_UINT32 port_ler_estimate[PI_PHY_K_MAX]; 4908c2ecf20Sopenharmony_ci PI_UINT32 port_ler_cutoff[PI_PHY_K_MAX]; 4918c2ecf20Sopenharmony_ci PI_UINT32 port_ler_alarm[PI_PHY_K_MAX]; 4928c2ecf20Sopenharmony_ci PI_UINT32 port_connect_state[PI_PHY_K_MAX]; 4938c2ecf20Sopenharmony_ci PI_UINT32 port_pcm_state[PI_PHY_K_MAX]; 4948c2ecf20Sopenharmony_ci PI_UINT32 port_pc_withhold[PI_PHY_K_MAX]; 4958c2ecf20Sopenharmony_ci PI_UINT32 port_ler_flag[PI_PHY_K_MAX]; 4968c2ecf20Sopenharmony_ci PI_UINT32 port_hardware_present[PI_PHY_K_MAX]; 4978c2ecf20Sopenharmony_ci 4988c2ecf20Sopenharmony_ci /* GROUP for things that were added later, so must be at the end. */ 4998c2ecf20Sopenharmony_ci 5008c2ecf20Sopenharmony_ci PI_CNTR path_ring_latency; 5018c2ecf20Sopenharmony_ci 5028c2ecf20Sopenharmony_ci } PI_CMD_SMT_MIB_GET_RSP; 5038c2ecf20Sopenharmony_ci 5048c2ecf20Sopenharmony_ci 5058c2ecf20Sopenharmony_ci/* 5068c2ecf20Sopenharmony_ci * Item and group code definitions for SMT 7.3 mandatory objects. These 5078c2ecf20Sopenharmony_ci * definitions are to be used as appropriate in SMT_MIB_SET commands and 5088c2ecf20Sopenharmony_ci * certain host-sent SMT frames such as PMF Get and Set requests. The 5098c2ecf20Sopenharmony_ci * codes have been taken from the MIB summary section of ANSI SMT 7.3. 5108c2ecf20Sopenharmony_ci */ 5118c2ecf20Sopenharmony_ci 5128c2ecf20Sopenharmony_ci#define PI_GRP_K_SMT_STATION_ID 0x100A 5138c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_STATION_ID 0x100B 5148c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_OP_VERS_ID 0x100D 5158c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_HI_VERS_ID 0x100E 5168c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_LO_VERS_ID 0x100F 5178c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_USER_DATA 0x1011 5188c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_MIB_VERS_ID 0x1012 5198c2ecf20Sopenharmony_ci 5208c2ecf20Sopenharmony_ci#define PI_GRP_K_SMT_STATION_CONFIG 0x1014 5218c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_MAC_CT 0x1015 5228c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_NON_MASTER_CT 0x1016 5238c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_MASTER_CT 0x1017 5248c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_AVAIL_PATHS 0x1018 5258c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_CONFIG_CAPS 0x1019 5268c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_CONFIG_POL 0x101A 5278c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_CONN_POL 0x101B 5288c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_T_NOTIFY 0x101D 5298c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_STAT_POL 0x101E 5308c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_TR_MAX_EXP 0x101F 5318c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_PORT_INDEXES 0x1020 5328c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_MAC_INDEXES 0x1021 5338c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_BYPASS_PRESENT 0x1022 5348c2ecf20Sopenharmony_ci 5358c2ecf20Sopenharmony_ci#define PI_GRP_K_SMT_STATUS 0x1028 5368c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_ECM_STATE 0x1029 5378c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_CF_STATE 0x102A 5388c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_REM_DISC_FLAG 0x102C 5398c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_STATION_STATUS 0x102D 5408c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_PEER_WRAP_FLAG 0x102E 5418c2ecf20Sopenharmony_ci 5428c2ecf20Sopenharmony_ci#define PI_GRP_K_SMT_MIB_OPERATION 0x1032 5438c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_MSG_TIME_STAMP 0x1033 5448c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_TRN_TIME_STAMP 0x1034 5458c2ecf20Sopenharmony_ci 5468c2ecf20Sopenharmony_ci#define PI_ITEM_K_SMT_STATION_ACT 0x103C 5478c2ecf20Sopenharmony_ci 5488c2ecf20Sopenharmony_ci#define PI_GRP_K_MAC_CAPABILITIES 0x200A 5498c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_FRM_STAT_FUNC 0x200B 5508c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_T_MAX_CAP 0x200D 5518c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_TVX_CAP 0x200E 5528c2ecf20Sopenharmony_ci 5538c2ecf20Sopenharmony_ci#define PI_GRP_K_MAC_CONFIG 0x2014 5548c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_AVAIL_PATHS 0x2016 5558c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_CURRENT_PATH 0x2017 5568c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_UP_NBR 0x2018 5578c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_DOWN_NBR 0x2019 5588c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_OLD_UP_NBR 0x201A 5598c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_OLD_DOWN_NBR 0x201B 5608c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_DUP_ADDR_TEST 0x201D 5618c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_REQ_PATHS 0x2020 5628c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_DOWN_PORT_TYPE 0x2021 5638c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_INDEX 0x2022 5648c2ecf20Sopenharmony_ci 5658c2ecf20Sopenharmony_ci#define PI_GRP_K_MAC_ADDRESS 0x2028 5668c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_SMT_ADDRESS 0x2029 5678c2ecf20Sopenharmony_ci 5688c2ecf20Sopenharmony_ci#define PI_GRP_K_MAC_OPERATION 0x2032 5698c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_TREQ 0x2033 5708c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_TNEG 0x2034 5718c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_TMAX 0x2035 5728c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_TVX_VALUE 0x2036 5738c2ecf20Sopenharmony_ci 5748c2ecf20Sopenharmony_ci#define PI_GRP_K_MAC_COUNTERS 0x2046 5758c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_FRAME_CT 0x2047 5768c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_COPIED_CT 0x2048 5778c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_TRANSMIT_CT 0x2049 5788c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_ERROR_CT 0x2051 5798c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_LOST_CT 0x2052 5808c2ecf20Sopenharmony_ci 5818c2ecf20Sopenharmony_ci#define PI_GRP_K_MAC_FRM_ERR_COND 0x205A 5828c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_FRM_ERR_THR 0x205F 5838c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_FRM_ERR_RAT 0x2060 5848c2ecf20Sopenharmony_ci 5858c2ecf20Sopenharmony_ci#define PI_GRP_K_MAC_STATUS 0x206E 5868c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_RMT_STATE 0x206F 5878c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_DA_FLAG 0x2070 5888c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_UNDA_FLAG 0x2071 5898c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_FRM_ERR_FLAG 0x2072 5908c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_MA_UNIT_AVAIL 0x2074 5918c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_HW_PRESENT 0x2075 5928c2ecf20Sopenharmony_ci#define PI_ITEM_K_MAC_MA_UNIT_ENAB 0x2076 5938c2ecf20Sopenharmony_ci 5948c2ecf20Sopenharmony_ci#define PI_GRP_K_PATH_CONFIG 0x320A 5958c2ecf20Sopenharmony_ci#define PI_ITEM_K_PATH_INDEX 0x320B 5968c2ecf20Sopenharmony_ci#define PI_ITEM_K_PATH_CONFIGURATION 0x3212 5978c2ecf20Sopenharmony_ci#define PI_ITEM_K_PATH_TVX_LB 0x3215 5988c2ecf20Sopenharmony_ci#define PI_ITEM_K_PATH_T_MAX_LB 0x3216 5998c2ecf20Sopenharmony_ci#define PI_ITEM_K_PATH_MAX_T_REQ 0x3217 6008c2ecf20Sopenharmony_ci 6018c2ecf20Sopenharmony_ci#define PI_GRP_K_PORT_CONFIG 0x400A 6028c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_MY_TYPE 0x400C 6038c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_NBR_TYPE 0x400D 6048c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_CONN_POLS 0x400E 6058c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_MAC_INDICATED 0x400F 6068c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_CURRENT_PATH 0x4010 6078c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_REQ_PATHS 0x4011 6088c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_MAC_PLACEMENT 0x4012 6098c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_AVAIL_PATHS 0x4013 6108c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_PMD_CLASS 0x4016 6118c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_CONN_CAPS 0x4017 6128c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_INDEX 0x401D 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ci#define PI_GRP_K_PORT_OPERATION 0x401E 6158c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_BS_FLAG 0x4021 6168c2ecf20Sopenharmony_ci 6178c2ecf20Sopenharmony_ci#define PI_GRP_K_PORT_ERR_CNTRS 0x4028 6188c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_LCT_FAIL_CT 0x402A 6198c2ecf20Sopenharmony_ci 6208c2ecf20Sopenharmony_ci#define PI_GRP_K_PORT_LER 0x4032 6218c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_LER_ESTIMATE 0x4033 6228c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_LEM_REJ_CT 0x4034 6238c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_LEM_CT 0x4035 6248c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_LER_CUTOFF 0x403A 6258c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_LER_ALARM 0x403B 6268c2ecf20Sopenharmony_ci 6278c2ecf20Sopenharmony_ci#define PI_GRP_K_PORT_STATUS 0x403C 6288c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_CONNECT_STATE 0x403D 6298c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_PCM_STATE 0x403E 6308c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_PC_WITHHOLD 0x403F 6318c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_LER_FLAG 0x4040 6328c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_HW_PRESENT 0x4041 6338c2ecf20Sopenharmony_ci 6348c2ecf20Sopenharmony_ci#define PI_ITEM_K_PORT_ACT 0x4046 6358c2ecf20Sopenharmony_ci 6368c2ecf20Sopenharmony_ci/* Addr_Filter_Set Request */ 6378c2ecf20Sopenharmony_ci 6388c2ecf20Sopenharmony_ci#define PI_CMD_ADDR_FILTER_K_SIZE 62 6398c2ecf20Sopenharmony_ci 6408c2ecf20Sopenharmony_citypedef struct 6418c2ecf20Sopenharmony_ci { 6428c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 6438c2ecf20Sopenharmony_ci PI_LAN_ADDR entry[PI_CMD_ADDR_FILTER_K_SIZE]; 6448c2ecf20Sopenharmony_ci } PI_CMD_ADDR_FILTER_SET_REQ; 6458c2ecf20Sopenharmony_ci 6468c2ecf20Sopenharmony_ci/* Addr_Filter_Set Response */ 6478c2ecf20Sopenharmony_ci 6488c2ecf20Sopenharmony_citypedef struct 6498c2ecf20Sopenharmony_ci { 6508c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 6518c2ecf20Sopenharmony_ci } PI_CMD_ADDR_FILTER_SET_RSP; 6528c2ecf20Sopenharmony_ci 6538c2ecf20Sopenharmony_ci/* Addr_Filter_Get Request */ 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_citypedef struct 6568c2ecf20Sopenharmony_ci { 6578c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 6588c2ecf20Sopenharmony_ci } PI_CMD_ADDR_FILTER_GET_REQ; 6598c2ecf20Sopenharmony_ci 6608c2ecf20Sopenharmony_ci/* Addr_Filter_Get Response */ 6618c2ecf20Sopenharmony_ci 6628c2ecf20Sopenharmony_citypedef struct 6638c2ecf20Sopenharmony_ci { 6648c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 6658c2ecf20Sopenharmony_ci PI_LAN_ADDR entry[PI_CMD_ADDR_FILTER_K_SIZE]; 6668c2ecf20Sopenharmony_ci } PI_CMD_ADDR_FILTER_GET_RSP; 6678c2ecf20Sopenharmony_ci 6688c2ecf20Sopenharmony_ci/* Status_Chars_Get Request */ 6698c2ecf20Sopenharmony_ci 6708c2ecf20Sopenharmony_citypedef struct 6718c2ecf20Sopenharmony_ci { 6728c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 6738c2ecf20Sopenharmony_ci } PI_CMD_STATUS_CHARS_GET_REQ; 6748c2ecf20Sopenharmony_ci 6758c2ecf20Sopenharmony_ci/* Status_Chars_Get Response */ 6768c2ecf20Sopenharmony_ci 6778c2ecf20Sopenharmony_citypedef struct 6788c2ecf20Sopenharmony_ci { 6798c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 6808c2ecf20Sopenharmony_ci PI_STATION_ID station_id; /* Station */ 6818c2ecf20Sopenharmony_ci PI_UINT32 station_type; 6828c2ecf20Sopenharmony_ci PI_UINT32 smt_ver_id; 6838c2ecf20Sopenharmony_ci PI_UINT32 smt_ver_id_max; 6848c2ecf20Sopenharmony_ci PI_UINT32 smt_ver_id_min; 6858c2ecf20Sopenharmony_ci PI_UINT32 station_state; 6868c2ecf20Sopenharmony_ci PI_LAN_ADDR link_addr; /* Link */ 6878c2ecf20Sopenharmony_ci PI_UINT32 t_req; 6888c2ecf20Sopenharmony_ci PI_UINT32 tvx; 6898c2ecf20Sopenharmony_ci PI_UINT32 token_timeout; 6908c2ecf20Sopenharmony_ci PI_UINT32 purger_enb; 6918c2ecf20Sopenharmony_ci PI_UINT32 link_state; 6928c2ecf20Sopenharmony_ci PI_UINT32 tneg; 6938c2ecf20Sopenharmony_ci PI_UINT32 dup_addr_flag; 6948c2ecf20Sopenharmony_ci PI_LAN_ADDR una; 6958c2ecf20Sopenharmony_ci PI_LAN_ADDR una_old; 6968c2ecf20Sopenharmony_ci PI_UINT32 un_dup_addr_flag; 6978c2ecf20Sopenharmony_ci PI_LAN_ADDR dna; 6988c2ecf20Sopenharmony_ci PI_LAN_ADDR dna_old; 6998c2ecf20Sopenharmony_ci PI_UINT32 purger_state; 7008c2ecf20Sopenharmony_ci PI_UINT32 fci_mode; 7018c2ecf20Sopenharmony_ci PI_UINT32 error_reason; 7028c2ecf20Sopenharmony_ci PI_UINT32 loopback; 7038c2ecf20Sopenharmony_ci PI_UINT32 ring_latency; 7048c2ecf20Sopenharmony_ci PI_LAN_ADDR last_dir_beacon_sa; 7058c2ecf20Sopenharmony_ci PI_LAN_ADDR last_dir_beacon_una; 7068c2ecf20Sopenharmony_ci PI_UINT32 phy_type[PI_PHY_K_MAX]; /* Phy */ 7078c2ecf20Sopenharmony_ci PI_UINT32 pmd_type[PI_PHY_K_MAX]; 7088c2ecf20Sopenharmony_ci PI_UINT32 lem_threshold[PI_PHY_K_MAX]; 7098c2ecf20Sopenharmony_ci PI_UINT32 phy_state[PI_PHY_K_MAX]; 7108c2ecf20Sopenharmony_ci PI_UINT32 nbor_phy_type[PI_PHY_K_MAX]; 7118c2ecf20Sopenharmony_ci PI_UINT32 link_error_est[PI_PHY_K_MAX]; 7128c2ecf20Sopenharmony_ci PI_UINT32 broken_reason[PI_PHY_K_MAX]; 7138c2ecf20Sopenharmony_ci PI_UINT32 reject_reason[PI_PHY_K_MAX]; 7148c2ecf20Sopenharmony_ci PI_UINT32 cntr_interval; /* Miscellaneous */ 7158c2ecf20Sopenharmony_ci PI_UINT32 module_rev; 7168c2ecf20Sopenharmony_ci PI_UINT32 firmware_rev; 7178c2ecf20Sopenharmony_ci PI_UINT32 mop_device_type; 7188c2ecf20Sopenharmony_ci PI_UINT32 phy_led[PI_PHY_K_MAX]; 7198c2ecf20Sopenharmony_ci PI_UINT32 flush_time; 7208c2ecf20Sopenharmony_ci } PI_CMD_STATUS_CHARS_GET_RSP; 7218c2ecf20Sopenharmony_ci 7228c2ecf20Sopenharmony_ci/* FDDI_MIB_Get Request */ 7238c2ecf20Sopenharmony_ci 7248c2ecf20Sopenharmony_citypedef struct 7258c2ecf20Sopenharmony_ci { 7268c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 7278c2ecf20Sopenharmony_ci } PI_CMD_FDDI_MIB_GET_REQ; 7288c2ecf20Sopenharmony_ci 7298c2ecf20Sopenharmony_ci/* FDDI_MIB_Get Response */ 7308c2ecf20Sopenharmony_ci 7318c2ecf20Sopenharmony_citypedef struct 7328c2ecf20Sopenharmony_ci { 7338c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 7348c2ecf20Sopenharmony_ci 7358c2ecf20Sopenharmony_ci /* SMT GROUP */ 7368c2ecf20Sopenharmony_ci 7378c2ecf20Sopenharmony_ci PI_STATION_ID smt_station_id; 7388c2ecf20Sopenharmony_ci PI_UINT32 smt_op_version_id; 7398c2ecf20Sopenharmony_ci PI_UINT32 smt_hi_version_id; 7408c2ecf20Sopenharmony_ci PI_UINT32 smt_lo_version_id; 7418c2ecf20Sopenharmony_ci PI_UINT32 smt_mac_ct; 7428c2ecf20Sopenharmony_ci PI_UINT32 smt_non_master_ct; 7438c2ecf20Sopenharmony_ci PI_UINT32 smt_master_ct; 7448c2ecf20Sopenharmony_ci PI_UINT32 smt_paths_available; 7458c2ecf20Sopenharmony_ci PI_UINT32 smt_config_capabilities; 7468c2ecf20Sopenharmony_ci PI_UINT32 smt_config_policy; 7478c2ecf20Sopenharmony_ci PI_UINT32 smt_connection_policy; 7488c2ecf20Sopenharmony_ci PI_UINT32 smt_t_notify; 7498c2ecf20Sopenharmony_ci PI_UINT32 smt_status_reporting; 7508c2ecf20Sopenharmony_ci PI_UINT32 smt_ecm_state; 7518c2ecf20Sopenharmony_ci PI_UINT32 smt_cf_state; 7528c2ecf20Sopenharmony_ci PI_UINT32 smt_hold_state; 7538c2ecf20Sopenharmony_ci PI_UINT32 smt_remote_disconnect_flag; 7548c2ecf20Sopenharmony_ci PI_UINT32 smt_station_action; 7558c2ecf20Sopenharmony_ci 7568c2ecf20Sopenharmony_ci /* MAC GROUP */ 7578c2ecf20Sopenharmony_ci 7588c2ecf20Sopenharmony_ci PI_UINT32 mac_frame_status_capabilities; 7598c2ecf20Sopenharmony_ci PI_UINT32 mac_t_max_greatest_lower_bound; 7608c2ecf20Sopenharmony_ci PI_UINT32 mac_tvx_greatest_lower_bound; 7618c2ecf20Sopenharmony_ci PI_UINT32 mac_paths_available; 7628c2ecf20Sopenharmony_ci PI_UINT32 mac_current_path; 7638c2ecf20Sopenharmony_ci PI_LAN_ADDR mac_upstream_nbr; 7648c2ecf20Sopenharmony_ci PI_LAN_ADDR mac_old_upstream_nbr; 7658c2ecf20Sopenharmony_ci PI_UINT32 mac_dup_addr_test; 7668c2ecf20Sopenharmony_ci PI_UINT32 mac_paths_requested; 7678c2ecf20Sopenharmony_ci PI_UINT32 mac_downstream_port_type; 7688c2ecf20Sopenharmony_ci PI_LAN_ADDR mac_smt_address; 7698c2ecf20Sopenharmony_ci PI_UINT32 mac_t_req; 7708c2ecf20Sopenharmony_ci PI_UINT32 mac_t_neg; 7718c2ecf20Sopenharmony_ci PI_UINT32 mac_t_max; 7728c2ecf20Sopenharmony_ci PI_UINT32 mac_tvx_value; 7738c2ecf20Sopenharmony_ci PI_UINT32 mac_t_min; 7748c2ecf20Sopenharmony_ci PI_UINT32 mac_current_frame_status; 7758c2ecf20Sopenharmony_ci /* mac_frame_cts */ 7768c2ecf20Sopenharmony_ci /* mac_error_cts */ 7778c2ecf20Sopenharmony_ci /* mac_lost_cts */ 7788c2ecf20Sopenharmony_ci PI_UINT32 mac_frame_error_threshold; 7798c2ecf20Sopenharmony_ci PI_UINT32 mac_frame_error_ratio; 7808c2ecf20Sopenharmony_ci PI_UINT32 mac_rmt_state; 7818c2ecf20Sopenharmony_ci PI_UINT32 mac_da_flag; 7828c2ecf20Sopenharmony_ci PI_UINT32 mac_una_da_flag; 7838c2ecf20Sopenharmony_ci PI_UINT32 mac_frame_condition; 7848c2ecf20Sopenharmony_ci PI_UINT32 mac_chip_set; 7858c2ecf20Sopenharmony_ci PI_UINT32 mac_action; 7868c2ecf20Sopenharmony_ci 7878c2ecf20Sopenharmony_ci /* PATH GROUP => Does not need to be implemented */ 7888c2ecf20Sopenharmony_ci 7898c2ecf20Sopenharmony_ci /* PORT GROUP */ 7908c2ecf20Sopenharmony_ci 7918c2ecf20Sopenharmony_ci PI_UINT32 port_pc_type[PI_PHY_K_MAX]; 7928c2ecf20Sopenharmony_ci PI_UINT32 port_pc_neighbor[PI_PHY_K_MAX]; 7938c2ecf20Sopenharmony_ci PI_UINT32 port_connection_policies[PI_PHY_K_MAX]; 7948c2ecf20Sopenharmony_ci PI_UINT32 port_remote_mac_indicated[PI_PHY_K_MAX]; 7958c2ecf20Sopenharmony_ci PI_UINT32 port_ce_state[PI_PHY_K_MAX]; 7968c2ecf20Sopenharmony_ci PI_UINT32 port_paths_requested[PI_PHY_K_MAX]; 7978c2ecf20Sopenharmony_ci PI_UINT32 port_mac_placement[PI_PHY_K_MAX]; 7988c2ecf20Sopenharmony_ci PI_UINT32 port_available_paths[PI_PHY_K_MAX]; 7998c2ecf20Sopenharmony_ci PI_UINT32 port_mac_loop_time[PI_PHY_K_MAX]; 8008c2ecf20Sopenharmony_ci PI_UINT32 port_tb_max[PI_PHY_K_MAX]; 8018c2ecf20Sopenharmony_ci PI_UINT32 port_bs_flag[PI_PHY_K_MAX]; 8028c2ecf20Sopenharmony_ci /* port_lct_fail_cts[PI_PHY_K_MAX]; */ 8038c2ecf20Sopenharmony_ci PI_UINT32 port_ler_estimate[PI_PHY_K_MAX]; 8048c2ecf20Sopenharmony_ci /* port_lem_reject_cts[PI_PHY_K_MAX]; */ 8058c2ecf20Sopenharmony_ci /* port_lem_cts[PI_PHY_K_MAX]; */ 8068c2ecf20Sopenharmony_ci PI_UINT32 port_ler_cutoff[PI_PHY_K_MAX]; 8078c2ecf20Sopenharmony_ci PI_UINT32 port_ler_alarm[PI_PHY_K_MAX]; 8088c2ecf20Sopenharmony_ci PI_UINT32 port_connect_state[PI_PHY_K_MAX]; 8098c2ecf20Sopenharmony_ci PI_UINT32 port_pcm_state[PI_PHY_K_MAX]; 8108c2ecf20Sopenharmony_ci PI_UINT32 port_pc_withhold[PI_PHY_K_MAX]; 8118c2ecf20Sopenharmony_ci PI_UINT32 port_ler_condition[PI_PHY_K_MAX]; 8128c2ecf20Sopenharmony_ci PI_UINT32 port_chip_set[PI_PHY_K_MAX]; 8138c2ecf20Sopenharmony_ci PI_UINT32 port_action[PI_PHY_K_MAX]; 8148c2ecf20Sopenharmony_ci 8158c2ecf20Sopenharmony_ci /* ATTACHMENT GROUP */ 8168c2ecf20Sopenharmony_ci 8178c2ecf20Sopenharmony_ci PI_UINT32 attachment_class; 8188c2ecf20Sopenharmony_ci PI_UINT32 attachment_ob_present; 8198c2ecf20Sopenharmony_ci PI_UINT32 attachment_imax_expiration; 8208c2ecf20Sopenharmony_ci PI_UINT32 attachment_inserted_status; 8218c2ecf20Sopenharmony_ci PI_UINT32 attachment_insert_policy; 8228c2ecf20Sopenharmony_ci 8238c2ecf20Sopenharmony_ci /* CHIP SET GROUP => Does not need to be implemented */ 8248c2ecf20Sopenharmony_ci 8258c2ecf20Sopenharmony_ci } PI_CMD_FDDI_MIB_GET_RSP; 8268c2ecf20Sopenharmony_ci 8278c2ecf20Sopenharmony_ci/* DEC_Ext_MIB_Get Request */ 8288c2ecf20Sopenharmony_ci 8298c2ecf20Sopenharmony_citypedef struct 8308c2ecf20Sopenharmony_ci { 8318c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 8328c2ecf20Sopenharmony_ci } PI_CMD_DEC_EXT_MIB_GET_REQ; 8338c2ecf20Sopenharmony_ci 8348c2ecf20Sopenharmony_ci/* DEC_Ext_MIB_Get (efddi and efdx groups only) Response */ 8358c2ecf20Sopenharmony_ci 8368c2ecf20Sopenharmony_citypedef struct 8378c2ecf20Sopenharmony_ci { 8388c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 8398c2ecf20Sopenharmony_ci 8408c2ecf20Sopenharmony_ci /* SMT GROUP */ 8418c2ecf20Sopenharmony_ci 8428c2ecf20Sopenharmony_ci PI_UINT32 esmt_station_type; 8438c2ecf20Sopenharmony_ci 8448c2ecf20Sopenharmony_ci /* MAC GROUP */ 8458c2ecf20Sopenharmony_ci 8468c2ecf20Sopenharmony_ci PI_UINT32 emac_link_state; 8478c2ecf20Sopenharmony_ci PI_UINT32 emac_ring_purger_state; 8488c2ecf20Sopenharmony_ci PI_UINT32 emac_ring_purger_enable; 8498c2ecf20Sopenharmony_ci PI_UINT32 emac_frame_strip_mode; 8508c2ecf20Sopenharmony_ci PI_UINT32 emac_ring_error_reason; 8518c2ecf20Sopenharmony_ci PI_UINT32 emac_up_nbr_dup_addr_flag; 8528c2ecf20Sopenharmony_ci PI_UINT32 emac_restricted_token_timeout; 8538c2ecf20Sopenharmony_ci 8548c2ecf20Sopenharmony_ci /* PORT GROUP */ 8558c2ecf20Sopenharmony_ci 8568c2ecf20Sopenharmony_ci PI_UINT32 eport_pmd_type[PI_PHY_K_MAX]; 8578c2ecf20Sopenharmony_ci PI_UINT32 eport_phy_state[PI_PHY_K_MAX]; 8588c2ecf20Sopenharmony_ci PI_UINT32 eport_reject_reason[PI_PHY_K_MAX]; 8598c2ecf20Sopenharmony_ci 8608c2ecf20Sopenharmony_ci /* FDX (Full-Duplex) GROUP */ 8618c2ecf20Sopenharmony_ci 8628c2ecf20Sopenharmony_ci PI_UINT32 efdx_enable; /* Valid only in SMT 7.3 */ 8638c2ecf20Sopenharmony_ci PI_UINT32 efdx_op; /* Valid only in SMT 7.3 */ 8648c2ecf20Sopenharmony_ci PI_UINT32 efdx_state; /* Valid only in SMT 7.3 */ 8658c2ecf20Sopenharmony_ci 8668c2ecf20Sopenharmony_ci } PI_CMD_DEC_EXT_MIB_GET_RSP; 8678c2ecf20Sopenharmony_ci 8688c2ecf20Sopenharmony_citypedef struct 8698c2ecf20Sopenharmony_ci { 8708c2ecf20Sopenharmony_ci PI_CNTR traces_rcvd; /* Station */ 8718c2ecf20Sopenharmony_ci PI_CNTR frame_cnt; /* Link */ 8728c2ecf20Sopenharmony_ci PI_CNTR error_cnt; 8738c2ecf20Sopenharmony_ci PI_CNTR lost_cnt; 8748c2ecf20Sopenharmony_ci PI_CNTR octets_rcvd; 8758c2ecf20Sopenharmony_ci PI_CNTR octets_sent; 8768c2ecf20Sopenharmony_ci PI_CNTR pdus_rcvd; 8778c2ecf20Sopenharmony_ci PI_CNTR pdus_sent; 8788c2ecf20Sopenharmony_ci PI_CNTR mcast_octets_rcvd; 8798c2ecf20Sopenharmony_ci PI_CNTR mcast_octets_sent; 8808c2ecf20Sopenharmony_ci PI_CNTR mcast_pdus_rcvd; 8818c2ecf20Sopenharmony_ci PI_CNTR mcast_pdus_sent; 8828c2ecf20Sopenharmony_ci PI_CNTR xmt_underruns; 8838c2ecf20Sopenharmony_ci PI_CNTR xmt_failures; 8848c2ecf20Sopenharmony_ci PI_CNTR block_check_errors; 8858c2ecf20Sopenharmony_ci PI_CNTR frame_status_errors; 8868c2ecf20Sopenharmony_ci PI_CNTR pdu_length_errors; 8878c2ecf20Sopenharmony_ci PI_CNTR rcv_overruns; 8888c2ecf20Sopenharmony_ci PI_CNTR user_buff_unavailable; 8898c2ecf20Sopenharmony_ci PI_CNTR inits_initiated; 8908c2ecf20Sopenharmony_ci PI_CNTR inits_rcvd; 8918c2ecf20Sopenharmony_ci PI_CNTR beacons_initiated; 8928c2ecf20Sopenharmony_ci PI_CNTR dup_addrs; 8938c2ecf20Sopenharmony_ci PI_CNTR dup_tokens; 8948c2ecf20Sopenharmony_ci PI_CNTR purge_errors; 8958c2ecf20Sopenharmony_ci PI_CNTR fci_strip_errors; 8968c2ecf20Sopenharmony_ci PI_CNTR traces_initiated; 8978c2ecf20Sopenharmony_ci PI_CNTR directed_beacons_rcvd; 8988c2ecf20Sopenharmony_ci PI_CNTR emac_frame_alignment_errors; 8998c2ecf20Sopenharmony_ci PI_CNTR ebuff_errors[PI_PHY_K_MAX]; /* Phy */ 9008c2ecf20Sopenharmony_ci PI_CNTR lct_rejects[PI_PHY_K_MAX]; 9018c2ecf20Sopenharmony_ci PI_CNTR lem_rejects[PI_PHY_K_MAX]; 9028c2ecf20Sopenharmony_ci PI_CNTR link_errors[PI_PHY_K_MAX]; 9038c2ecf20Sopenharmony_ci PI_CNTR connections[PI_PHY_K_MAX]; 9048c2ecf20Sopenharmony_ci PI_CNTR copied_cnt; /* Valid only if using SMT 7.3 */ 9058c2ecf20Sopenharmony_ci PI_CNTR transmit_cnt; /* Valid only if using SMT 7.3 */ 9068c2ecf20Sopenharmony_ci PI_CNTR tokens; 9078c2ecf20Sopenharmony_ci } PI_CNTR_BLK; 9088c2ecf20Sopenharmony_ci 9098c2ecf20Sopenharmony_ci/* Counters_Get Request */ 9108c2ecf20Sopenharmony_ci 9118c2ecf20Sopenharmony_citypedef struct 9128c2ecf20Sopenharmony_ci { 9138c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 9148c2ecf20Sopenharmony_ci } PI_CMD_CNTRS_GET_REQ; 9158c2ecf20Sopenharmony_ci 9168c2ecf20Sopenharmony_ci/* Counters_Get Response */ 9178c2ecf20Sopenharmony_ci 9188c2ecf20Sopenharmony_citypedef struct 9198c2ecf20Sopenharmony_ci { 9208c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 9218c2ecf20Sopenharmony_ci PI_CNTR time_since_reset; 9228c2ecf20Sopenharmony_ci PI_CNTR_BLK cntrs; 9238c2ecf20Sopenharmony_ci } PI_CMD_CNTRS_GET_RSP; 9248c2ecf20Sopenharmony_ci 9258c2ecf20Sopenharmony_ci/* Counters_Set Request */ 9268c2ecf20Sopenharmony_ci 9278c2ecf20Sopenharmony_citypedef struct 9288c2ecf20Sopenharmony_ci { 9298c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 9308c2ecf20Sopenharmony_ci PI_CNTR_BLK cntrs; 9318c2ecf20Sopenharmony_ci } PI_CMD_CNTRS_SET_REQ; 9328c2ecf20Sopenharmony_ci 9338c2ecf20Sopenharmony_ci/* Counters_Set Response */ 9348c2ecf20Sopenharmony_ci 9358c2ecf20Sopenharmony_citypedef struct 9368c2ecf20Sopenharmony_ci { 9378c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 9388c2ecf20Sopenharmony_ci } PI_CMD_CNTRS_SET_RSP; 9398c2ecf20Sopenharmony_ci 9408c2ecf20Sopenharmony_ci/* Error_Log_Clear Request */ 9418c2ecf20Sopenharmony_ci 9428c2ecf20Sopenharmony_citypedef struct 9438c2ecf20Sopenharmony_ci { 9448c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 9458c2ecf20Sopenharmony_ci } PI_CMD_ERROR_LOG_CLEAR_REQ; 9468c2ecf20Sopenharmony_ci 9478c2ecf20Sopenharmony_ci/* Error_Log_Clear Response */ 9488c2ecf20Sopenharmony_ci 9498c2ecf20Sopenharmony_citypedef struct 9508c2ecf20Sopenharmony_ci { 9518c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 9528c2ecf20Sopenharmony_ci } PI_CMD_ERROR_LOG_CLEAR_RSP; 9538c2ecf20Sopenharmony_ci 9548c2ecf20Sopenharmony_ci/* Error_Log_Get Request */ 9558c2ecf20Sopenharmony_ci 9568c2ecf20Sopenharmony_ci#define PI_LOG_ENTRY_K_INDEX_MIN 0 /* Minimum index for entry */ 9578c2ecf20Sopenharmony_ci 9588c2ecf20Sopenharmony_citypedef struct 9598c2ecf20Sopenharmony_ci { 9608c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 9618c2ecf20Sopenharmony_ci PI_UINT32 entry_index; 9628c2ecf20Sopenharmony_ci } PI_CMD_ERROR_LOG_GET_REQ; 9638c2ecf20Sopenharmony_ci 9648c2ecf20Sopenharmony_ci/* Error_Log_Get Response */ 9658c2ecf20Sopenharmony_ci 9668c2ecf20Sopenharmony_ci#define PI_K_LOG_FW_SIZE 111 /* Max number of fw longwords */ 9678c2ecf20Sopenharmony_ci#define PI_K_LOG_DIAG_SIZE 6 /* Max number of diag longwords */ 9688c2ecf20Sopenharmony_ci 9698c2ecf20Sopenharmony_citypedef struct 9708c2ecf20Sopenharmony_ci { 9718c2ecf20Sopenharmony_ci struct 9728c2ecf20Sopenharmony_ci { 9738c2ecf20Sopenharmony_ci PI_UINT32 fru_imp_mask; 9748c2ecf20Sopenharmony_ci PI_UINT32 test_id; 9758c2ecf20Sopenharmony_ci PI_UINT32 reserved[PI_K_LOG_DIAG_SIZE]; 9768c2ecf20Sopenharmony_ci } diag; 9778c2ecf20Sopenharmony_ci PI_UINT32 fw[PI_K_LOG_FW_SIZE]; 9788c2ecf20Sopenharmony_ci } PI_LOG_ENTRY; 9798c2ecf20Sopenharmony_ci 9808c2ecf20Sopenharmony_citypedef struct 9818c2ecf20Sopenharmony_ci { 9828c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 9838c2ecf20Sopenharmony_ci PI_UINT32 event_status; 9848c2ecf20Sopenharmony_ci PI_UINT32 caller_id; 9858c2ecf20Sopenharmony_ci PI_UINT32 timestamp_l; 9868c2ecf20Sopenharmony_ci PI_UINT32 timestamp_h; 9878c2ecf20Sopenharmony_ci PI_UINT32 write_count; 9888c2ecf20Sopenharmony_ci PI_LOG_ENTRY entry_info; 9898c2ecf20Sopenharmony_ci } PI_CMD_ERROR_LOG_GET_RSP; 9908c2ecf20Sopenharmony_ci 9918c2ecf20Sopenharmony_ci/* Define error log related constants and types. */ 9928c2ecf20Sopenharmony_ci/* Not all of the caller id's can occur. The only ones currently */ 9938c2ecf20Sopenharmony_ci/* implemented are: none, selftest, mfg, fw, console */ 9948c2ecf20Sopenharmony_ci 9958c2ecf20Sopenharmony_ci#define PI_LOG_EVENT_STATUS_K_VALID 0 /* Valid Event Status */ 9968c2ecf20Sopenharmony_ci#define PI_LOG_EVENT_STATUS_K_INVALID 1 /* Invalid Event Status */ 9978c2ecf20Sopenharmony_ci#define PI_LOG_CALLER_ID_K_NONE 0 /* No caller */ 9988c2ecf20Sopenharmony_ci#define PI_LOG_CALLER_ID_K_SELFTEST 1 /* Normal power-up selftest */ 9998c2ecf20Sopenharmony_ci#define PI_LOG_CALLER_ID_K_MFG 2 /* Mfg power-up selftest */ 10008c2ecf20Sopenharmony_ci#define PI_LOG_CALLER_ID_K_ONLINE 3 /* On-line diagnostics */ 10018c2ecf20Sopenharmony_ci#define PI_LOG_CALLER_ID_K_HW 4 /* Hardware */ 10028c2ecf20Sopenharmony_ci#define PI_LOG_CALLER_ID_K_FW 5 /* Firmware */ 10038c2ecf20Sopenharmony_ci#define PI_LOG_CALLER_ID_K_CNS_HW 6 /* CNS firmware */ 10048c2ecf20Sopenharmony_ci#define PI_LOG_CALLER_ID_K_CNS_FW 7 /* CNS hardware */ 10058c2ecf20Sopenharmony_ci#define PI_LOG_CALLER_ID_K_CONSOLE 8 /* Console Caller Id */ 10068c2ecf20Sopenharmony_ci 10078c2ecf20Sopenharmony_ci/* 10088c2ecf20Sopenharmony_ci * Place all DMA commands in the following request and response structures 10098c2ecf20Sopenharmony_ci * to simplify code. 10108c2ecf20Sopenharmony_ci */ 10118c2ecf20Sopenharmony_ci 10128c2ecf20Sopenharmony_citypedef union 10138c2ecf20Sopenharmony_ci { 10148c2ecf20Sopenharmony_ci PI_UINT32 cmd_type; 10158c2ecf20Sopenharmony_ci PI_CMD_START_REQ start; 10168c2ecf20Sopenharmony_ci PI_CMD_FILTERS_SET_REQ filter_set; 10178c2ecf20Sopenharmony_ci PI_CMD_FILTERS_GET_REQ filter_get; 10188c2ecf20Sopenharmony_ci PI_CMD_CHARS_SET_REQ char_set; 10198c2ecf20Sopenharmony_ci PI_CMD_ADDR_FILTER_SET_REQ addr_filter_set; 10208c2ecf20Sopenharmony_ci PI_CMD_ADDR_FILTER_GET_REQ addr_filter_get; 10218c2ecf20Sopenharmony_ci PI_CMD_STATUS_CHARS_GET_REQ stat_char_get; 10228c2ecf20Sopenharmony_ci PI_CMD_CNTRS_GET_REQ cntrs_get; 10238c2ecf20Sopenharmony_ci PI_CMD_CNTRS_SET_REQ cntrs_set; 10248c2ecf20Sopenharmony_ci PI_CMD_ERROR_LOG_CLEAR_REQ error_log_clear; 10258c2ecf20Sopenharmony_ci PI_CMD_ERROR_LOG_GET_REQ error_log_read; 10268c2ecf20Sopenharmony_ci PI_CMD_SNMP_SET_REQ snmp_set; 10278c2ecf20Sopenharmony_ci PI_CMD_FDDI_MIB_GET_REQ fddi_mib_get; 10288c2ecf20Sopenharmony_ci PI_CMD_DEC_EXT_MIB_GET_REQ dec_mib_get; 10298c2ecf20Sopenharmony_ci PI_CMD_SMT_MIB_SET_REQ smt_mib_set; 10308c2ecf20Sopenharmony_ci PI_CMD_SMT_MIB_GET_REQ smt_mib_get; 10318c2ecf20Sopenharmony_ci char pad[PI_CMD_REQ_K_SIZE_MAX]; 10328c2ecf20Sopenharmony_ci } PI_DMA_CMD_REQ; 10338c2ecf20Sopenharmony_ci 10348c2ecf20Sopenharmony_citypedef union 10358c2ecf20Sopenharmony_ci { 10368c2ecf20Sopenharmony_ci PI_RSP_HEADER header; 10378c2ecf20Sopenharmony_ci PI_CMD_START_RSP start; 10388c2ecf20Sopenharmony_ci PI_CMD_FILTERS_SET_RSP filter_set; 10398c2ecf20Sopenharmony_ci PI_CMD_FILTERS_GET_RSP filter_get; 10408c2ecf20Sopenharmony_ci PI_CMD_CHARS_SET_RSP char_set; 10418c2ecf20Sopenharmony_ci PI_CMD_ADDR_FILTER_SET_RSP addr_filter_set; 10428c2ecf20Sopenharmony_ci PI_CMD_ADDR_FILTER_GET_RSP addr_filter_get; 10438c2ecf20Sopenharmony_ci PI_CMD_STATUS_CHARS_GET_RSP stat_char_get; 10448c2ecf20Sopenharmony_ci PI_CMD_CNTRS_GET_RSP cntrs_get; 10458c2ecf20Sopenharmony_ci PI_CMD_CNTRS_SET_RSP cntrs_set; 10468c2ecf20Sopenharmony_ci PI_CMD_ERROR_LOG_CLEAR_RSP error_log_clear; 10478c2ecf20Sopenharmony_ci PI_CMD_ERROR_LOG_GET_RSP error_log_get; 10488c2ecf20Sopenharmony_ci PI_CMD_SNMP_SET_RSP snmp_set; 10498c2ecf20Sopenharmony_ci PI_CMD_FDDI_MIB_GET_RSP fddi_mib_get; 10508c2ecf20Sopenharmony_ci PI_CMD_DEC_EXT_MIB_GET_RSP dec_mib_get; 10518c2ecf20Sopenharmony_ci PI_CMD_SMT_MIB_SET_RSP smt_mib_set; 10528c2ecf20Sopenharmony_ci PI_CMD_SMT_MIB_GET_RSP smt_mib_get; 10538c2ecf20Sopenharmony_ci char pad[PI_CMD_RSP_K_SIZE_MAX]; 10548c2ecf20Sopenharmony_ci } PI_DMA_CMD_RSP; 10558c2ecf20Sopenharmony_ci 10568c2ecf20Sopenharmony_citypedef union 10578c2ecf20Sopenharmony_ci { 10588c2ecf20Sopenharmony_ci PI_DMA_CMD_REQ request; 10598c2ecf20Sopenharmony_ci PI_DMA_CMD_RSP response; 10608c2ecf20Sopenharmony_ci } PI_DMA_CMD_BUFFER; 10618c2ecf20Sopenharmony_ci 10628c2ecf20Sopenharmony_ci 10638c2ecf20Sopenharmony_ci/* Define format of Consumer Block (resident in host memory) */ 10648c2ecf20Sopenharmony_ci 10658c2ecf20Sopenharmony_citypedef struct 10668c2ecf20Sopenharmony_ci { 10678c2ecf20Sopenharmony_ci volatile PI_UINT32 xmt_rcv_data; 10688c2ecf20Sopenharmony_ci volatile PI_UINT32 reserved_1; 10698c2ecf20Sopenharmony_ci volatile PI_UINT32 smt_host; 10708c2ecf20Sopenharmony_ci volatile PI_UINT32 reserved_2; 10718c2ecf20Sopenharmony_ci volatile PI_UINT32 unsol; 10728c2ecf20Sopenharmony_ci volatile PI_UINT32 reserved_3; 10738c2ecf20Sopenharmony_ci volatile PI_UINT32 cmd_rsp; 10748c2ecf20Sopenharmony_ci volatile PI_UINT32 reserved_4; 10758c2ecf20Sopenharmony_ci volatile PI_UINT32 cmd_req; 10768c2ecf20Sopenharmony_ci volatile PI_UINT32 reserved_5; 10778c2ecf20Sopenharmony_ci } PI_CONSUMER_BLOCK; 10788c2ecf20Sopenharmony_ci 10798c2ecf20Sopenharmony_ci#define PI_CONS_M_RCV_INDEX 0x000000FF 10808c2ecf20Sopenharmony_ci#define PI_CONS_M_XMT_INDEX 0x00FF0000 10818c2ecf20Sopenharmony_ci#define PI_CONS_V_RCV_INDEX 0 10828c2ecf20Sopenharmony_ci#define PI_CONS_V_XMT_INDEX 16 10838c2ecf20Sopenharmony_ci 10848c2ecf20Sopenharmony_ci/* Offsets into consumer block */ 10858c2ecf20Sopenharmony_ci 10868c2ecf20Sopenharmony_ci#define PI_CONS_BLK_K_XMT_RCV 0x00 10878c2ecf20Sopenharmony_ci#define PI_CONS_BLK_K_SMT_HOST 0x08 10888c2ecf20Sopenharmony_ci#define PI_CONS_BLK_K_UNSOL 0x10 10898c2ecf20Sopenharmony_ci#define PI_CONS_BLK_K_CMD_RSP 0x18 10908c2ecf20Sopenharmony_ci#define PI_CONS_BLK_K_CMD_REQ 0x20 10918c2ecf20Sopenharmony_ci 10928c2ecf20Sopenharmony_ci/* Offsets into descriptor block */ 10938c2ecf20Sopenharmony_ci 10948c2ecf20Sopenharmony_ci#define PI_DESCR_BLK_K_RCV_DATA 0x0000 10958c2ecf20Sopenharmony_ci#define PI_DESCR_BLK_K_XMT_DATA 0x0800 10968c2ecf20Sopenharmony_ci#define PI_DESCR_BLK_K_SMT_HOST 0x1000 10978c2ecf20Sopenharmony_ci#define PI_DESCR_BLK_K_UNSOL 0x1200 10988c2ecf20Sopenharmony_ci#define PI_DESCR_BLK_K_CMD_RSP 0x1280 10998c2ecf20Sopenharmony_ci#define PI_DESCR_BLK_K_CMD_REQ 0x1300 11008c2ecf20Sopenharmony_ci 11018c2ecf20Sopenharmony_ci/* Define format of a rcv descr (Rcv Data, Cmd Rsp, Unsolicited, SMT Host) */ 11028c2ecf20Sopenharmony_ci/* Note a field has been added for later versions of the PDQ to allow for */ 11038c2ecf20Sopenharmony_ci/* finer granularity of the rcv buffer alignment. For backwards */ 11048c2ecf20Sopenharmony_ci/* compatibility, the two bits (which allow the rcv buffer to be longword */ 11058c2ecf20Sopenharmony_ci/* aligned) have been added at the MBZ bits. To support previous drivers, */ 11068c2ecf20Sopenharmony_ci/* the MBZ definition is left intact. */ 11078c2ecf20Sopenharmony_ci 11088c2ecf20Sopenharmony_citypedef struct 11098c2ecf20Sopenharmony_ci { 11108c2ecf20Sopenharmony_ci PI_UINT32 long_0; 11118c2ecf20Sopenharmony_ci PI_UINT32 long_1; 11128c2ecf20Sopenharmony_ci } PI_RCV_DESCR; 11138c2ecf20Sopenharmony_ci 11148c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_M_SOP 0x80000000 11158c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_M_SEG_LEN_LO 0x60000000 11168c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_M_MBZ 0x60000000 11178c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_M_SEG_LEN 0x1F800000 11188c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_M_SEG_LEN_HI 0x1FF00000 11198c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_M_SEG_CNT 0x000F0000 11208c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_M_BUFF_HI 0x0000FFFF 11218c2ecf20Sopenharmony_ci 11228c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_V_SOP 31 11238c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_V_SEG_LEN_LO 29 11248c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_V_MBZ 29 11258c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_V_SEG_LEN 23 11268c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_V_SEG_LEN_HI 20 11278c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_V_SEG_CNT 16 11288c2ecf20Sopenharmony_ci#define PI_RCV_DESCR_V_BUFF_HI 0 11298c2ecf20Sopenharmony_ci 11308c2ecf20Sopenharmony_ci/* Define the format of a transmit descriptor (Xmt Data, Cmd Req) */ 11318c2ecf20Sopenharmony_ci 11328c2ecf20Sopenharmony_citypedef struct 11338c2ecf20Sopenharmony_ci { 11348c2ecf20Sopenharmony_ci PI_UINT32 long_0; 11358c2ecf20Sopenharmony_ci PI_UINT32 long_1; 11368c2ecf20Sopenharmony_ci } PI_XMT_DESCR; 11378c2ecf20Sopenharmony_ci 11388c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_M_SOP 0x80000000 11398c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_M_EOP 0x40000000 11408c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_M_MBZ 0x20000000 11418c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_M_SEG_LEN 0x1FFF0000 11428c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_M_BUFF_HI 0x0000FFFF 11438c2ecf20Sopenharmony_ci 11448c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_V_SOP 31 11458c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_V_EOP 30 11468c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_V_MBZ 29 11478c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_V_SEG_LEN 16 11488c2ecf20Sopenharmony_ci#define PI_XMT_DESCR_V_BUFF_HI 0 11498c2ecf20Sopenharmony_ci 11508c2ecf20Sopenharmony_ci/* Define format of the Descriptor Block (resident in host memory) */ 11518c2ecf20Sopenharmony_ci 11528c2ecf20Sopenharmony_ci#define PI_RCV_DATA_K_NUM_ENTRIES 256 11538c2ecf20Sopenharmony_ci#define PI_XMT_DATA_K_NUM_ENTRIES 256 11548c2ecf20Sopenharmony_ci#define PI_SMT_HOST_K_NUM_ENTRIES 64 11558c2ecf20Sopenharmony_ci#define PI_UNSOL_K_NUM_ENTRIES 16 11568c2ecf20Sopenharmony_ci#define PI_CMD_RSP_K_NUM_ENTRIES 16 11578c2ecf20Sopenharmony_ci#define PI_CMD_REQ_K_NUM_ENTRIES 16 11588c2ecf20Sopenharmony_ci 11598c2ecf20Sopenharmony_citypedef struct 11608c2ecf20Sopenharmony_ci { 11618c2ecf20Sopenharmony_ci PI_RCV_DESCR rcv_data[PI_RCV_DATA_K_NUM_ENTRIES]; 11628c2ecf20Sopenharmony_ci PI_XMT_DESCR xmt_data[PI_XMT_DATA_K_NUM_ENTRIES]; 11638c2ecf20Sopenharmony_ci PI_RCV_DESCR smt_host[PI_SMT_HOST_K_NUM_ENTRIES]; 11648c2ecf20Sopenharmony_ci PI_RCV_DESCR unsol[PI_UNSOL_K_NUM_ENTRIES]; 11658c2ecf20Sopenharmony_ci PI_RCV_DESCR cmd_rsp[PI_CMD_RSP_K_NUM_ENTRIES]; 11668c2ecf20Sopenharmony_ci PI_XMT_DESCR cmd_req[PI_CMD_REQ_K_NUM_ENTRIES]; 11678c2ecf20Sopenharmony_ci } PI_DESCR_BLOCK; 11688c2ecf20Sopenharmony_ci 11698c2ecf20Sopenharmony_ci/* Define Port Registers - offsets from PDQ Base address */ 11708c2ecf20Sopenharmony_ci 11718c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_PORT_RESET 0x00000000 11728c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_HOST_DATA 0x00000004 11738c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_PORT_CTRL 0x00000008 11748c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_PORT_DATA_A 0x0000000C 11758c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_PORT_DATA_B 0x00000010 11768c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_PORT_STATUS 0x00000014 11778c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_TYPE_0_STATUS 0x00000018 11788c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_HOST_INT_ENB 0x0000001C 11798c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_TYPE_2_PROD_NOINT 0x00000020 11808c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_TYPE_2_PROD 0x00000024 11818c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_CMD_RSP_PROD 0x00000028 11828c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_CMD_REQ_PROD 0x0000002C 11838c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_SMT_HOST_PROD 0x00000030 11848c2ecf20Sopenharmony_ci#define PI_PDQ_K_REG_UNSOL_PROD 0x00000034 11858c2ecf20Sopenharmony_ci 11868c2ecf20Sopenharmony_ci/* Port Control Register - Command codes for primary commands */ 11878c2ecf20Sopenharmony_ci 11888c2ecf20Sopenharmony_ci#define PI_PCTRL_M_CMD_ERROR 0x8000 11898c2ecf20Sopenharmony_ci#define PI_PCTRL_M_BLAST_FLASH 0x4000 11908c2ecf20Sopenharmony_ci#define PI_PCTRL_M_HALT 0x2000 11918c2ecf20Sopenharmony_ci#define PI_PCTRL_M_COPY_DATA 0x1000 11928c2ecf20Sopenharmony_ci#define PI_PCTRL_M_ERROR_LOG_START 0x0800 11938c2ecf20Sopenharmony_ci#define PI_PCTRL_M_ERROR_LOG_READ 0x0400 11948c2ecf20Sopenharmony_ci#define PI_PCTRL_M_XMT_DATA_FLUSH_DONE 0x0200 11958c2ecf20Sopenharmony_ci#define PI_PCTRL_M_INIT 0x0100 11968c2ecf20Sopenharmony_ci#define PI_PCTRL_M_INIT_START 0x0080 11978c2ecf20Sopenharmony_ci#define PI_PCTRL_M_CONS_BLOCK 0x0040 11988c2ecf20Sopenharmony_ci#define PI_PCTRL_M_UNINIT 0x0020 11998c2ecf20Sopenharmony_ci#define PI_PCTRL_M_RING_MEMBER 0x0010 12008c2ecf20Sopenharmony_ci#define PI_PCTRL_M_MLA 0x0008 12018c2ecf20Sopenharmony_ci#define PI_PCTRL_M_FW_REV_READ 0x0004 12028c2ecf20Sopenharmony_ci#define PI_PCTRL_M_DEV_SPECIFIC 0x0002 12038c2ecf20Sopenharmony_ci#define PI_PCTRL_M_SUB_CMD 0x0001 12048c2ecf20Sopenharmony_ci 12058c2ecf20Sopenharmony_ci/* Define sub-commands accessed via the PI_PCTRL_M_SUB_CMD command */ 12068c2ecf20Sopenharmony_ci 12078c2ecf20Sopenharmony_ci#define PI_SUB_CMD_K_LINK_UNINIT 0x0001 12088c2ecf20Sopenharmony_ci#define PI_SUB_CMD_K_BURST_SIZE_SET 0x0002 12098c2ecf20Sopenharmony_ci#define PI_SUB_CMD_K_PDQ_REV_GET 0x0004 12108c2ecf20Sopenharmony_ci#define PI_SUB_CMD_K_HW_REV_GET 0x0008 12118c2ecf20Sopenharmony_ci 12128c2ecf20Sopenharmony_ci/* Define some Port Data B values */ 12138c2ecf20Sopenharmony_ci 12148c2ecf20Sopenharmony_ci#define PI_PDATA_B_DMA_BURST_SIZE_4 0 /* valid values for command */ 12158c2ecf20Sopenharmony_ci#define PI_PDATA_B_DMA_BURST_SIZE_8 1 12168c2ecf20Sopenharmony_ci#define PI_PDATA_B_DMA_BURST_SIZE_16 2 12178c2ecf20Sopenharmony_ci#define PI_PDATA_B_DMA_BURST_SIZE_32 3 /* not supported on PCI */ 12188c2ecf20Sopenharmony_ci#define PI_PDATA_B_DMA_BURST_SIZE_DEF PI_PDATA_B_DMA_BURST_SIZE_16 12198c2ecf20Sopenharmony_ci 12208c2ecf20Sopenharmony_ci/* Port Data A Reset state */ 12218c2ecf20Sopenharmony_ci 12228c2ecf20Sopenharmony_ci#define PI_PDATA_A_RESET_M_UPGRADE 0x00000001 12238c2ecf20Sopenharmony_ci#define PI_PDATA_A_RESET_M_SOFT_RESET 0x00000002 12248c2ecf20Sopenharmony_ci#define PI_PDATA_A_RESET_M_SKIP_ST 0x00000004 12258c2ecf20Sopenharmony_ci 12268c2ecf20Sopenharmony_ci/* Read adapter MLA address port control command constants */ 12278c2ecf20Sopenharmony_ci 12288c2ecf20Sopenharmony_ci#define PI_PDATA_A_MLA_K_LO 0 12298c2ecf20Sopenharmony_ci#define PI_PDATA_A_MLA_K_HI 1 12308c2ecf20Sopenharmony_ci 12318c2ecf20Sopenharmony_ci/* Byte Swap values for init command */ 12328c2ecf20Sopenharmony_ci 12338c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_M_DESC_BLK_ADDR 0x0FFFFE000 12348c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_M_RESERVED 0x000001FFC 12358c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_M_BSWAP_DATA 0x000000002 12368c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_M_BSWAP_LITERAL 0x000000001 12378c2ecf20Sopenharmony_ci 12388c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_V_DESC_BLK_ADDR 13 12398c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_V_RESERVED 3 12408c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_V_BSWAP_DATA 1 12418c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_V_BSWAP_LITERAL 0 12428c2ecf20Sopenharmony_ci 12438c2ecf20Sopenharmony_ci/* Port Reset Register */ 12448c2ecf20Sopenharmony_ci 12458c2ecf20Sopenharmony_ci#define PI_RESET_M_ASSERT_RESET 1 12468c2ecf20Sopenharmony_ci 12478c2ecf20Sopenharmony_ci/* Port Status register */ 12488c2ecf20Sopenharmony_ci 12498c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_RCV_DATA_PENDING 31 12508c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_XMT_DATA_PENDING 30 12518c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_SMT_HOST_PENDING 29 12528c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_UNSOL_PENDING 28 12538c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_CMD_RSP_PENDING 27 12548c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_CMD_REQ_PENDING 26 12558c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_TYPE_0_PENDING 25 12568c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_RESERVED_1 16 12578c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_RESERVED_2 11 12588c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_STATE 8 12598c2ecf20Sopenharmony_ci#define PI_PSTATUS_V_HALT_ID 0 12608c2ecf20Sopenharmony_ci 12618c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_RCV_DATA_PENDING 0x80000000 12628c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_XMT_DATA_PENDING 0x40000000 12638c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_SMT_HOST_PENDING 0x20000000 12648c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_UNSOL_PENDING 0x10000000 12658c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_CMD_RSP_PENDING 0x08000000 12668c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_CMD_REQ_PENDING 0x04000000 12678c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_TYPE_0_PENDING 0x02000000 12688c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_RESERVED_1 0x01FF0000 12698c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_RESERVED_2 0x0000F800 12708c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_STATE 0x00000700 12718c2ecf20Sopenharmony_ci#define PI_PSTATUS_M_HALT_ID 0x000000FF 12728c2ecf20Sopenharmony_ci 12738c2ecf20Sopenharmony_ci/* Define Halt Id's */ 12748c2ecf20Sopenharmony_ci/* Do not insert into this list, only append. */ 12758c2ecf20Sopenharmony_ci 12768c2ecf20Sopenharmony_ci#define PI_HALT_ID_K_SELFTEST_TIMEOUT 0 12778c2ecf20Sopenharmony_ci#define PI_HALT_ID_K_PARITY_ERROR 1 12788c2ecf20Sopenharmony_ci#define PI_HALT_ID_K_HOST_DIR_HALT 2 12798c2ecf20Sopenharmony_ci#define PI_HALT_ID_K_SW_FAULT 3 12808c2ecf20Sopenharmony_ci#define PI_HALT_ID_K_HW_FAULT 4 12818c2ecf20Sopenharmony_ci#define PI_HALT_ID_K_PC_TRACE 5 12828c2ecf20Sopenharmony_ci#define PI_HALT_ID_K_DMA_ERROR 6 /* Host Data has error reg */ 12838c2ecf20Sopenharmony_ci#define PI_HALT_ID_K_IMAGE_CRC_ERROR 7 /* Image is bad, update it */ 12848c2ecf20Sopenharmony_ci#define PI_HALT_ID_K_BUS_EXCEPTION 8 /* 68K bus exception */ 12858c2ecf20Sopenharmony_ci 12868c2ecf20Sopenharmony_ci/* Host Interrupt Enable Register as seen by host */ 12878c2ecf20Sopenharmony_ci 12888c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_XMT_DATA_ENB 0x80000000 /* Type 2 Enables */ 12898c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_RCV_DATA_ENB 0x40000000 12908c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_SMT_HOST_ENB 0x10000000 /* Type 1 Enables */ 12918c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_UNSOL_ENB 0x20000000 12928c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_CMD_RSP_ENB 0x08000000 12938c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_CMD_REQ_ENB 0x04000000 12948c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_TYPE_1_RESERVED 0x00FF0000 12958c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_TYPE_0_RESERVED 0x0000FF00 /* Type 0 Enables */ 12968c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_1MS 0x00000080 12978c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_20MS 0x00000040 12988c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_CSR_CMD_DONE 0x00000020 12998c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_STATE_CHANGE 0x00000010 13008c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_XMT_FLUSH 0x00000008 13018c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_NXM 0x00000004 13028c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_PM_PAR_ERR 0x00000002 13038c2ecf20Sopenharmony_ci#define PI_HOST_INT_M_BUS_PAR_ERR 0x00000001 13048c2ecf20Sopenharmony_ci 13058c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_XMT_DATA_ENB 31 /* Type 2 Enables */ 13068c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_RCV_DATA_ENB 30 13078c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_SMT_HOST_ENB 29 /* Type 1 Enables */ 13088c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_UNSOL_ENB 28 13098c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_CMD_RSP_ENB 27 13108c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_CMD_REQ_ENB 26 13118c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_TYPE_1_RESERVED 16 13128c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_TYPE_0_RESERVED 8 /* Type 0 Enables */ 13138c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_1MS_ENB 7 13148c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_20MS_ENB 6 13158c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_CSR_CMD_DONE_ENB 5 13168c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_STATE_CHANGE_ENB 4 13178c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_XMT_FLUSH_ENB 3 13188c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_NXM_ENB 2 13198c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_PM_PAR_ERR_ENB 1 13208c2ecf20Sopenharmony_ci#define PI_HOST_INT_V_BUS_PAR_ERR_ENB 0 13218c2ecf20Sopenharmony_ci 13228c2ecf20Sopenharmony_ci#define PI_HOST_INT_K_ACK_ALL_TYPE_0 0x000000FF 13238c2ecf20Sopenharmony_ci#define PI_HOST_INT_K_DISABLE_ALL_INTS 0x00000000 13248c2ecf20Sopenharmony_ci#define PI_HOST_INT_K_ENABLE_ALL_INTS 0xFFFFFFFF 13258c2ecf20Sopenharmony_ci#define PI_HOST_INT_K_ENABLE_DEF_INTS 0xC000001F 13268c2ecf20Sopenharmony_ci 13278c2ecf20Sopenharmony_ci/* Type 0 Interrupt Status Register */ 13288c2ecf20Sopenharmony_ci 13298c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_M_1MS 0x00000080 13308c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_M_20MS 0x00000040 13318c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_M_CSR_CMD_DONE 0x00000020 13328c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_M_STATE_CHANGE 0x00000010 13338c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_M_XMT_FLUSH 0x00000008 13348c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_M_NXM 0x00000004 13358c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_M_PM_PAR_ERR 0x00000002 13368c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_M_BUS_PAR_ERR 0x00000001 13378c2ecf20Sopenharmony_ci 13388c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_V_1MS 7 13398c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_V_20MS 6 13408c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_V_CSR_CMD_DONE 5 13418c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_V_STATE_CHANGE 4 13428c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_V_XMT_FLUSH 3 13438c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_V_NXM 2 13448c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_V_PM_PAR_ERR 1 13458c2ecf20Sopenharmony_ci#define PI_TYPE_0_STAT_V_BUS_PAR_ERR 0 13468c2ecf20Sopenharmony_ci 13478c2ecf20Sopenharmony_ci/* Register definition structures are defined for both big and little endian systems */ 13488c2ecf20Sopenharmony_ci 13498c2ecf20Sopenharmony_ci#ifndef __BIG_ENDIAN 13508c2ecf20Sopenharmony_ci 13518c2ecf20Sopenharmony_ci/* Little endian format of Type 1 Producer register */ 13528c2ecf20Sopenharmony_ci 13538c2ecf20Sopenharmony_citypedef union 13548c2ecf20Sopenharmony_ci { 13558c2ecf20Sopenharmony_ci PI_UINT32 lword; 13568c2ecf20Sopenharmony_ci struct 13578c2ecf20Sopenharmony_ci { 13588c2ecf20Sopenharmony_ci PI_UINT8 prod; 13598c2ecf20Sopenharmony_ci PI_UINT8 comp; 13608c2ecf20Sopenharmony_ci PI_UINT8 mbz_1; 13618c2ecf20Sopenharmony_ci PI_UINT8 mbz_2; 13628c2ecf20Sopenharmony_ci } index; 13638c2ecf20Sopenharmony_ci } PI_TYPE_1_PROD_REG; 13648c2ecf20Sopenharmony_ci 13658c2ecf20Sopenharmony_ci/* Little endian format of Type 2 Producer register */ 13668c2ecf20Sopenharmony_ci 13678c2ecf20Sopenharmony_citypedef union 13688c2ecf20Sopenharmony_ci { 13698c2ecf20Sopenharmony_ci PI_UINT32 lword; 13708c2ecf20Sopenharmony_ci struct 13718c2ecf20Sopenharmony_ci { 13728c2ecf20Sopenharmony_ci PI_UINT8 rcv_prod; 13738c2ecf20Sopenharmony_ci PI_UINT8 xmt_prod; 13748c2ecf20Sopenharmony_ci PI_UINT8 rcv_comp; 13758c2ecf20Sopenharmony_ci PI_UINT8 xmt_comp; 13768c2ecf20Sopenharmony_ci } index; 13778c2ecf20Sopenharmony_ci } PI_TYPE_2_PROD_REG; 13788c2ecf20Sopenharmony_ci 13798c2ecf20Sopenharmony_ci/* Little endian format of Type 1 Consumer Block longword */ 13808c2ecf20Sopenharmony_ci 13818c2ecf20Sopenharmony_citypedef union 13828c2ecf20Sopenharmony_ci { 13838c2ecf20Sopenharmony_ci PI_UINT32 lword; 13848c2ecf20Sopenharmony_ci struct 13858c2ecf20Sopenharmony_ci { 13868c2ecf20Sopenharmony_ci PI_UINT8 cons; 13878c2ecf20Sopenharmony_ci PI_UINT8 res0; 13888c2ecf20Sopenharmony_ci PI_UINT8 res1; 13898c2ecf20Sopenharmony_ci PI_UINT8 res2; 13908c2ecf20Sopenharmony_ci } index; 13918c2ecf20Sopenharmony_ci } PI_TYPE_1_CONSUMER; 13928c2ecf20Sopenharmony_ci 13938c2ecf20Sopenharmony_ci/* Little endian format of Type 2 Consumer Block longword */ 13948c2ecf20Sopenharmony_ci 13958c2ecf20Sopenharmony_citypedef union 13968c2ecf20Sopenharmony_ci { 13978c2ecf20Sopenharmony_ci PI_UINT32 lword; 13988c2ecf20Sopenharmony_ci struct 13998c2ecf20Sopenharmony_ci { 14008c2ecf20Sopenharmony_ci PI_UINT8 rcv_cons; 14018c2ecf20Sopenharmony_ci PI_UINT8 res0; 14028c2ecf20Sopenharmony_ci PI_UINT8 xmt_cons; 14038c2ecf20Sopenharmony_ci PI_UINT8 res1; 14048c2ecf20Sopenharmony_ci } index; 14058c2ecf20Sopenharmony_ci } PI_TYPE_2_CONSUMER; 14068c2ecf20Sopenharmony_ci 14078c2ecf20Sopenharmony_ci/* Define swapping required by DMA transfers. */ 14088c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_M_BSWAP_INIT \ 14098c2ecf20Sopenharmony_ci (PI_PDATA_A_INIT_M_BSWAP_DATA) 14108c2ecf20Sopenharmony_ci 14118c2ecf20Sopenharmony_ci#else /* __BIG_ENDIAN */ 14128c2ecf20Sopenharmony_ci 14138c2ecf20Sopenharmony_ci/* Big endian format of Type 1 Producer register */ 14148c2ecf20Sopenharmony_ci 14158c2ecf20Sopenharmony_citypedef union 14168c2ecf20Sopenharmony_ci { 14178c2ecf20Sopenharmony_ci PI_UINT32 lword; 14188c2ecf20Sopenharmony_ci struct 14198c2ecf20Sopenharmony_ci { 14208c2ecf20Sopenharmony_ci PI_UINT8 mbz_2; 14218c2ecf20Sopenharmony_ci PI_UINT8 mbz_1; 14228c2ecf20Sopenharmony_ci PI_UINT8 comp; 14238c2ecf20Sopenharmony_ci PI_UINT8 prod; 14248c2ecf20Sopenharmony_ci } index; 14258c2ecf20Sopenharmony_ci } PI_TYPE_1_PROD_REG; 14268c2ecf20Sopenharmony_ci 14278c2ecf20Sopenharmony_ci/* Big endian format of Type 2 Producer register */ 14288c2ecf20Sopenharmony_ci 14298c2ecf20Sopenharmony_citypedef union 14308c2ecf20Sopenharmony_ci { 14318c2ecf20Sopenharmony_ci PI_UINT32 lword; 14328c2ecf20Sopenharmony_ci struct 14338c2ecf20Sopenharmony_ci { 14348c2ecf20Sopenharmony_ci PI_UINT8 xmt_comp; 14358c2ecf20Sopenharmony_ci PI_UINT8 rcv_comp; 14368c2ecf20Sopenharmony_ci PI_UINT8 xmt_prod; 14378c2ecf20Sopenharmony_ci PI_UINT8 rcv_prod; 14388c2ecf20Sopenharmony_ci } index; 14398c2ecf20Sopenharmony_ci } PI_TYPE_2_PROD_REG; 14408c2ecf20Sopenharmony_ci 14418c2ecf20Sopenharmony_ci/* Big endian format of Type 1 Consumer Block longword */ 14428c2ecf20Sopenharmony_ci 14438c2ecf20Sopenharmony_citypedef union 14448c2ecf20Sopenharmony_ci { 14458c2ecf20Sopenharmony_ci PI_UINT32 lword; 14468c2ecf20Sopenharmony_ci struct 14478c2ecf20Sopenharmony_ci { 14488c2ecf20Sopenharmony_ci PI_UINT8 res2; 14498c2ecf20Sopenharmony_ci PI_UINT8 res1; 14508c2ecf20Sopenharmony_ci PI_UINT8 res0; 14518c2ecf20Sopenharmony_ci PI_UINT8 cons; 14528c2ecf20Sopenharmony_ci } index; 14538c2ecf20Sopenharmony_ci } PI_TYPE_1_CONSUMER; 14548c2ecf20Sopenharmony_ci 14558c2ecf20Sopenharmony_ci/* Big endian format of Type 2 Consumer Block longword */ 14568c2ecf20Sopenharmony_ci 14578c2ecf20Sopenharmony_citypedef union 14588c2ecf20Sopenharmony_ci { 14598c2ecf20Sopenharmony_ci PI_UINT32 lword; 14608c2ecf20Sopenharmony_ci struct 14618c2ecf20Sopenharmony_ci { 14628c2ecf20Sopenharmony_ci PI_UINT8 res1; 14638c2ecf20Sopenharmony_ci PI_UINT8 xmt_cons; 14648c2ecf20Sopenharmony_ci PI_UINT8 res0; 14658c2ecf20Sopenharmony_ci PI_UINT8 rcv_cons; 14668c2ecf20Sopenharmony_ci } index; 14678c2ecf20Sopenharmony_ci } PI_TYPE_2_CONSUMER; 14688c2ecf20Sopenharmony_ci 14698c2ecf20Sopenharmony_ci/* Define swapping required by DMA transfers. */ 14708c2ecf20Sopenharmony_ci#define PI_PDATA_A_INIT_M_BSWAP_INIT \ 14718c2ecf20Sopenharmony_ci (PI_PDATA_A_INIT_M_BSWAP_DATA | PI_PDATA_A_INIT_M_BSWAP_LITERAL) 14728c2ecf20Sopenharmony_ci 14738c2ecf20Sopenharmony_ci#endif /* __BIG_ENDIAN */ 14748c2ecf20Sopenharmony_ci 14758c2ecf20Sopenharmony_ci/* Define TC PDQ CSR offset and length */ 14768c2ecf20Sopenharmony_ci 14778c2ecf20Sopenharmony_ci#define PI_TC_K_CSR_OFFSET 0x100000 14788c2ecf20Sopenharmony_ci#define PI_TC_K_CSR_LEN 0x40 /* 64 bytes */ 14798c2ecf20Sopenharmony_ci 14808c2ecf20Sopenharmony_ci/* Define EISA controller register offsets */ 14818c2ecf20Sopenharmony_ci 14828c2ecf20Sopenharmony_ci#define PI_ESIC_K_CSR_IO_LEN 0x40 /* 64 bytes */ 14838c2ecf20Sopenharmony_ci#define PI_ESIC_K_BURST_HOLDOFF_LEN 0x04 /* 4 bytes */ 14848c2ecf20Sopenharmony_ci#define PI_ESIC_K_ESIC_CSR_LEN 0x40 /* 64 bytes */ 14858c2ecf20Sopenharmony_ci 14868c2ecf20Sopenharmony_ci#define PI_DEFEA_K_CSR_IO 0x000 14878c2ecf20Sopenharmony_ci#define PI_DEFEA_K_BURST_HOLDOFF 0x040 14888c2ecf20Sopenharmony_ci#define PI_ESIC_K_ESIC_CSR 0xC80 14898c2ecf20Sopenharmony_ci 14908c2ecf20Sopenharmony_ci#define PI_ESIC_K_SLOT_ID 0xC80 14918c2ecf20Sopenharmony_ci#define PI_ESIC_K_SLOT_CNTRL 0xC84 14928c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_CMP_0 0xC85 14938c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_CMP_1 0xC86 14948c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_CMP_2 0xC87 14958c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_HI_CMP_0 0xC88 14968c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_HI_CMP_1 0xC89 14978c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_HI_CMP_2 0xC8A 14988c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_MASK_0 0xC8B 14998c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_MASK_1 0xC8C 15008c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_MASK_2 0xC8D 15018c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_LO_CMP_0 0xC8E 15028c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_LO_CMP_1 0xC8F 15038c2ecf20Sopenharmony_ci#define PI_ESIC_K_MEM_ADD_LO_CMP_2 0xC90 15048c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_CMP_0_0 0xC91 15058c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_CMP_0_1 0xC92 15068c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_CMP_1_0 0xC93 15078c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_CMP_1_1 0xC94 15088c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_CMP_2_0 0xC95 15098c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_CMP_2_1 0xC96 15108c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_CMP_3_0 0xC97 15118c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_CMP_3_1 0xC98 15128c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_MASK_0_0 0xC99 15138c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_MASK_0_1 0xC9A 15148c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_MASK_1_0 0xC9B 15158c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_MASK_1_1 0xC9C 15168c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_MASK_2_0 0xC9D 15178c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_MASK_2_1 0xC9E 15188c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_MASK_3_0 0xC9F 15198c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_ADD_MASK_3_1 0xCA0 15208c2ecf20Sopenharmony_ci#define PI_ESIC_K_MOD_CONFIG_1 0xCA1 15218c2ecf20Sopenharmony_ci#define PI_ESIC_K_MOD_CONFIG_2 0xCA2 15228c2ecf20Sopenharmony_ci#define PI_ESIC_K_MOD_CONFIG_3 0xCA3 15238c2ecf20Sopenharmony_ci#define PI_ESIC_K_MOD_CONFIG_4 0xCA4 15248c2ecf20Sopenharmony_ci#define PI_ESIC_K_MOD_CONFIG_5 0xCA5 15258c2ecf20Sopenharmony_ci#define PI_ESIC_K_MOD_CONFIG_6 0xCA6 15268c2ecf20Sopenharmony_ci#define PI_ESIC_K_MOD_CONFIG_7 0xCA7 15278c2ecf20Sopenharmony_ci#define PI_ESIC_K_DIP_SWITCH 0xCA8 15288c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_CONFIG_STAT_0 0xCA9 15298c2ecf20Sopenharmony_ci#define PI_ESIC_K_IO_CONFIG_STAT_1 0xCAA 15308c2ecf20Sopenharmony_ci#define PI_ESIC_K_DMA_CONFIG 0xCAB 15318c2ecf20Sopenharmony_ci#define PI_ESIC_K_INPUT_PORT 0xCAC 15328c2ecf20Sopenharmony_ci#define PI_ESIC_K_OUTPUT_PORT 0xCAD 15338c2ecf20Sopenharmony_ci#define PI_ESIC_K_FUNCTION_CNTRL 0xCAE 15348c2ecf20Sopenharmony_ci 15358c2ecf20Sopenharmony_ci/* Define the bits in the function control register. */ 15368c2ecf20Sopenharmony_ci 15378c2ecf20Sopenharmony_ci#define PI_FUNCTION_CNTRL_M_IOCS0 0x01 15388c2ecf20Sopenharmony_ci#define PI_FUNCTION_CNTRL_M_IOCS1 0x02 15398c2ecf20Sopenharmony_ci#define PI_FUNCTION_CNTRL_M_IOCS2 0x04 15408c2ecf20Sopenharmony_ci#define PI_FUNCTION_CNTRL_M_IOCS3 0x08 15418c2ecf20Sopenharmony_ci#define PI_FUNCTION_CNTRL_M_MEMCS0 0x10 15428c2ecf20Sopenharmony_ci#define PI_FUNCTION_CNTRL_M_MEMCS1 0x20 15438c2ecf20Sopenharmony_ci#define PI_FUNCTION_CNTRL_M_DMA 0x80 15448c2ecf20Sopenharmony_ci 15458c2ecf20Sopenharmony_ci/* Define the bits in the slot control register. */ 15468c2ecf20Sopenharmony_ci 15478c2ecf20Sopenharmony_ci#define PI_SLOT_CNTRL_M_RESET 0x04 /* Don't use. */ 15488c2ecf20Sopenharmony_ci#define PI_SLOT_CNTRL_M_ERROR 0x02 /* Not implemented. */ 15498c2ecf20Sopenharmony_ci#define PI_SLOT_CNTRL_M_ENB 0x01 /* Must be set. */ 15508c2ecf20Sopenharmony_ci 15518c2ecf20Sopenharmony_ci/* Define the bits in the burst holdoff register. */ 15528c2ecf20Sopenharmony_ci 15538c2ecf20Sopenharmony_ci#define PI_BURST_HOLDOFF_M_HOLDOFF 0xFC 15548c2ecf20Sopenharmony_ci#define PI_BURST_HOLDOFF_M_RESERVED 0x02 15558c2ecf20Sopenharmony_ci#define PI_BURST_HOLDOFF_M_MEM_MAP 0x01 15568c2ecf20Sopenharmony_ci 15578c2ecf20Sopenharmony_ci#define PI_BURST_HOLDOFF_V_HOLDOFF 2 15588c2ecf20Sopenharmony_ci#define PI_BURST_HOLDOFF_V_RESERVED 1 15598c2ecf20Sopenharmony_ci#define PI_BURST_HOLDOFF_V_MEM_MAP 0 15608c2ecf20Sopenharmony_ci 15618c2ecf20Sopenharmony_ci/* Define the implicit mask of the Memory Address Compare registers. */ 15628c2ecf20Sopenharmony_ci 15638c2ecf20Sopenharmony_ci#define PI_MEM_ADD_MASK_M 0x3ff 15648c2ecf20Sopenharmony_ci 15658c2ecf20Sopenharmony_ci/* Define the fields in the I/O Address Compare and Mask registers. */ 15668c2ecf20Sopenharmony_ci 15678c2ecf20Sopenharmony_ci#define PI_IO_CMP_M_SLOT 0xf0 15688c2ecf20Sopenharmony_ci 15698c2ecf20Sopenharmony_ci#define PI_IO_CMP_V_SLOT 4 15708c2ecf20Sopenharmony_ci 15718c2ecf20Sopenharmony_ci/* Define the fields in the Interrupt Channel Configuration and Status reg */ 15728c2ecf20Sopenharmony_ci 15738c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_M_PEND 0x80 15748c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_M_RES_1 0x40 15758c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_M_IREQ_OUT 0x20 15768c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_M_IREQ_IN 0x10 15778c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_M_INT_ENB 0x08 15788c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_M_RES_0 0x04 15798c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_M_IRQ 0x03 15808c2ecf20Sopenharmony_ci 15818c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_V_PEND 7 15828c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_V_RES_1 6 15838c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_V_IREQ_OUT 5 15848c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_V_IREQ_IN 4 15858c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_V_INT_ENB 3 15868c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_V_RES_0 2 15878c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_V_IRQ 0 15888c2ecf20Sopenharmony_ci 15898c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_IRQ_K_9 0 15908c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_IRQ_K_10 1 15918c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_IRQ_K_11 2 15928c2ecf20Sopenharmony_ci#define PI_CONFIG_STAT_0_IRQ_K_15 3 15938c2ecf20Sopenharmony_ci 15948c2ecf20Sopenharmony_ci/* Define DEC FDDIcontroller/EISA (DEFEA) EISA hardware ID's */ 15958c2ecf20Sopenharmony_ci 15968c2ecf20Sopenharmony_ci#define DEFEA_PRODUCT_ID 0x0030A310 /* DEC product 300 (no rev) */ 15978c2ecf20Sopenharmony_ci#define DEFEA_PROD_ID_1 0x0130A310 /* DEC product 300, rev 1 */ 15988c2ecf20Sopenharmony_ci#define DEFEA_PROD_ID_2 0x0230A310 /* DEC product 300, rev 2 */ 15998c2ecf20Sopenharmony_ci#define DEFEA_PROD_ID_3 0x0330A310 /* DEC product 300, rev 3 */ 16008c2ecf20Sopenharmony_ci#define DEFEA_PROD_ID_4 0x0430A310 /* DEC product 300, rev 4 */ 16018c2ecf20Sopenharmony_ci 16028c2ecf20Sopenharmony_ci/**********************************************/ 16038c2ecf20Sopenharmony_ci/* Digital PFI Specification v1.0 Definitions */ 16048c2ecf20Sopenharmony_ci/**********************************************/ 16058c2ecf20Sopenharmony_ci 16068c2ecf20Sopenharmony_ci/* PCI Configuration Space Constants */ 16078c2ecf20Sopenharmony_ci 16088c2ecf20Sopenharmony_ci#define PFI_K_LAT_TIMER_DEF 0x88 /* def max master latency timer */ 16098c2ecf20Sopenharmony_ci#define PFI_K_LAT_TIMER_MIN 0x20 /* min max master latency timer */ 16108c2ecf20Sopenharmony_ci#define PFI_K_CSR_MEM_LEN 0x80 /* 128 bytes */ 16118c2ecf20Sopenharmony_ci#define PFI_K_CSR_IO_LEN 0x80 /* 128 bytes */ 16128c2ecf20Sopenharmony_ci#define PFI_K_PKT_MEM_LEN 0x10000 /* 64K bytes */ 16138c2ecf20Sopenharmony_ci 16148c2ecf20Sopenharmony_ci/* PFI Register Offsets (starting at PDQ Register Base Address) */ 16158c2ecf20Sopenharmony_ci 16168c2ecf20Sopenharmony_ci#define PFI_K_REG_RESERVED_0 0X00000038 16178c2ecf20Sopenharmony_ci#define PFI_K_REG_RESERVED_1 0X0000003C 16188c2ecf20Sopenharmony_ci#define PFI_K_REG_MODE_CTRL 0X00000040 16198c2ecf20Sopenharmony_ci#define PFI_K_REG_STATUS 0X00000044 16208c2ecf20Sopenharmony_ci#define PFI_K_REG_FIFO_WRITE 0X00000048 16218c2ecf20Sopenharmony_ci#define PFI_K_REG_FIFO_READ 0X0000004C 16228c2ecf20Sopenharmony_ci 16238c2ecf20Sopenharmony_ci/* PFI Mode Control Register Constants */ 16248c2ecf20Sopenharmony_ci 16258c2ecf20Sopenharmony_ci#define PFI_MODE_M_RESERVED 0XFFFFFFF0 16268c2ecf20Sopenharmony_ci#define PFI_MODE_M_TGT_ABORT_ENB 0X00000008 16278c2ecf20Sopenharmony_ci#define PFI_MODE_M_PDQ_INT_ENB 0X00000004 16288c2ecf20Sopenharmony_ci#define PFI_MODE_M_PFI_INT_ENB 0X00000002 16298c2ecf20Sopenharmony_ci#define PFI_MODE_M_DMA_ENB 0X00000001 16308c2ecf20Sopenharmony_ci 16318c2ecf20Sopenharmony_ci#define PFI_MODE_V_RESERVED 4 16328c2ecf20Sopenharmony_ci#define PFI_MODE_V_TGT_ABORT_ENB 3 16338c2ecf20Sopenharmony_ci#define PFI_MODE_V_PDQ_INT_ENB 2 16348c2ecf20Sopenharmony_ci#define PFI_MODE_V_PFI_INT_ENB 1 16358c2ecf20Sopenharmony_ci#define PFI_MODE_V_DMA_ENB 0 16368c2ecf20Sopenharmony_ci 16378c2ecf20Sopenharmony_ci#define PFI_MODE_K_ALL_DISABLE 0X00000000 16388c2ecf20Sopenharmony_ci 16398c2ecf20Sopenharmony_ci/* PFI Status Register Constants */ 16408c2ecf20Sopenharmony_ci 16418c2ecf20Sopenharmony_ci#define PFI_STATUS_M_RESERVED 0XFFFFFFC0 16428c2ecf20Sopenharmony_ci#define PFI_STATUS_M_PFI_ERROR 0X00000020 /* only valid in rev 1 or later PFI */ 16438c2ecf20Sopenharmony_ci#define PFI_STATUS_M_PDQ_INT 0X00000010 16448c2ecf20Sopenharmony_ci#define PFI_STATUS_M_PDQ_DMA_ABORT 0X00000008 16458c2ecf20Sopenharmony_ci#define PFI_STATUS_M_FIFO_FULL 0X00000004 16468c2ecf20Sopenharmony_ci#define PFI_STATUS_M_FIFO_EMPTY 0X00000002 16478c2ecf20Sopenharmony_ci#define PFI_STATUS_M_DMA_IN_PROGRESS 0X00000001 16488c2ecf20Sopenharmony_ci 16498c2ecf20Sopenharmony_ci#define PFI_STATUS_V_RESERVED 6 16508c2ecf20Sopenharmony_ci#define PFI_STATUS_V_PFI_ERROR 5 /* only valid in rev 1 or later PFI */ 16518c2ecf20Sopenharmony_ci#define PFI_STATUS_V_PDQ_INT 4 16528c2ecf20Sopenharmony_ci#define PFI_STATUS_V_PDQ_DMA_ABORT 3 16538c2ecf20Sopenharmony_ci#define PFI_STATUS_V_FIFO_FULL 2 16548c2ecf20Sopenharmony_ci#define PFI_STATUS_V_FIFO_EMPTY 1 16558c2ecf20Sopenharmony_ci#define PFI_STATUS_V_DMA_IN_PROGRESS 0 16568c2ecf20Sopenharmony_ci 16578c2ecf20Sopenharmony_ci#define DFX_FC_PRH2_PRH1_PRH0 0x54003820 /* Packet Request Header bytes + FC */ 16588c2ecf20Sopenharmony_ci#define DFX_PRH0_BYTE 0x20 /* Packet Request Header byte 0 */ 16598c2ecf20Sopenharmony_ci#define DFX_PRH1_BYTE 0x38 /* Packet Request Header byte 1 */ 16608c2ecf20Sopenharmony_ci#define DFX_PRH2_BYTE 0x00 /* Packet Request Header byte 2 */ 16618c2ecf20Sopenharmony_ci 16628c2ecf20Sopenharmony_ci/* Driver routine status (return) codes */ 16638c2ecf20Sopenharmony_ci 16648c2ecf20Sopenharmony_ci#define DFX_K_SUCCESS 0 /* routine succeeded */ 16658c2ecf20Sopenharmony_ci#define DFX_K_FAILURE 1 /* routine failed */ 16668c2ecf20Sopenharmony_ci#define DFX_K_OUTSTATE 2 /* bad state for command */ 16678c2ecf20Sopenharmony_ci#define DFX_K_HW_TIMEOUT 3 /* command timed out */ 16688c2ecf20Sopenharmony_ci 16698c2ecf20Sopenharmony_ci/* Define LLC host receive buffer min/max/default values */ 16708c2ecf20Sopenharmony_ci 16718c2ecf20Sopenharmony_ci#define RCV_BUFS_MIN 2 /* minimum pre-allocated receive buffers */ 16728c2ecf20Sopenharmony_ci#define RCV_BUFS_MAX 32 /* maximum pre-allocated receive buffers */ 16738c2ecf20Sopenharmony_ci#define RCV_BUFS_DEF 8 /* default pre-allocated receive buffers */ 16748c2ecf20Sopenharmony_ci 16758c2ecf20Sopenharmony_ci/* Define offsets into FDDI LLC or SMT receive frame buffers - used when indicating frames */ 16768c2ecf20Sopenharmony_ci 16778c2ecf20Sopenharmony_ci#define RCV_BUFF_K_DESCR 0 /* four byte FMC descriptor */ 16788c2ecf20Sopenharmony_ci#define RCV_BUFF_K_PADDING 4 /* three null bytes */ 16798c2ecf20Sopenharmony_ci#define RCV_BUFF_K_FC 7 /* one byte frame control */ 16808c2ecf20Sopenharmony_ci#define RCV_BUFF_K_DA 8 /* six byte destination address */ 16818c2ecf20Sopenharmony_ci#define RCV_BUFF_K_SA 14 /* six byte source address */ 16828c2ecf20Sopenharmony_ci#define RCV_BUFF_K_DATA 20 /* offset to start of packet data */ 16838c2ecf20Sopenharmony_ci 16848c2ecf20Sopenharmony_ci/* Define offsets into FDDI LLC transmit frame buffers - used when sending frames */ 16858c2ecf20Sopenharmony_ci 16868c2ecf20Sopenharmony_ci#define XMT_BUFF_K_FC 0 /* one byte frame control */ 16878c2ecf20Sopenharmony_ci#define XMT_BUFF_K_DA 1 /* six byte destination address */ 16888c2ecf20Sopenharmony_ci#define XMT_BUFF_K_SA 7 /* six byte source address */ 16898c2ecf20Sopenharmony_ci#define XMT_BUFF_K_DATA 13 /* offset to start of packet data */ 16908c2ecf20Sopenharmony_ci 16918c2ecf20Sopenharmony_ci/* Macro for checking a "value" is within a specific range */ 16928c2ecf20Sopenharmony_ci 16938c2ecf20Sopenharmony_ci#define IN_RANGE(value,low,high) ((value >= low) && (value <= high)) 16948c2ecf20Sopenharmony_ci 16958c2ecf20Sopenharmony_ci/* Only execute special print call when debug driver was built */ 16968c2ecf20Sopenharmony_ci 16978c2ecf20Sopenharmony_ci#ifdef DEFXX_DEBUG 16988c2ecf20Sopenharmony_ci#define DBG_printk(args...) printk(args) 16998c2ecf20Sopenharmony_ci#else 17008c2ecf20Sopenharmony_ci#define DBG_printk(args...) 17018c2ecf20Sopenharmony_ci#endif 17028c2ecf20Sopenharmony_ci 17038c2ecf20Sopenharmony_ci/* Define constants for masking/unmasking interrupts */ 17048c2ecf20Sopenharmony_ci 17058c2ecf20Sopenharmony_ci#define DFX_MASK_INTERRUPTS 1 17068c2ecf20Sopenharmony_ci#define DFX_UNMASK_INTERRUPTS 0 17078c2ecf20Sopenharmony_ci 17088c2ecf20Sopenharmony_ci/* Define structure for driver transmit descriptor block */ 17098c2ecf20Sopenharmony_ci 17108c2ecf20Sopenharmony_citypedef struct 17118c2ecf20Sopenharmony_ci { 17128c2ecf20Sopenharmony_ci struct sk_buff *p_skb; /* ptr to skb */ 17138c2ecf20Sopenharmony_ci } XMT_DRIVER_DESCR; 17148c2ecf20Sopenharmony_ci 17158c2ecf20Sopenharmony_citypedef struct DFX_board_tag 17168c2ecf20Sopenharmony_ci { 17178c2ecf20Sopenharmony_ci /* Keep virtual and physical pointers to locked, physically contiguous memory */ 17188c2ecf20Sopenharmony_ci 17198c2ecf20Sopenharmony_ci char *kmalloced; /* pci_free_consistent this on unload */ 17208c2ecf20Sopenharmony_ci dma_addr_t kmalloced_dma; 17218c2ecf20Sopenharmony_ci /* DMA handle for the above */ 17228c2ecf20Sopenharmony_ci PI_DESCR_BLOCK *descr_block_virt; /* PDQ descriptor block virt address */ 17238c2ecf20Sopenharmony_ci dma_addr_t descr_block_phys; /* PDQ descriptor block phys address */ 17248c2ecf20Sopenharmony_ci PI_DMA_CMD_REQ *cmd_req_virt; /* Command request buffer virt address */ 17258c2ecf20Sopenharmony_ci dma_addr_t cmd_req_phys; /* Command request buffer phys address */ 17268c2ecf20Sopenharmony_ci PI_DMA_CMD_RSP *cmd_rsp_virt; /* Command response buffer virt address */ 17278c2ecf20Sopenharmony_ci dma_addr_t cmd_rsp_phys; /* Command response buffer phys address */ 17288c2ecf20Sopenharmony_ci char *rcv_block_virt; /* LLC host receive queue buf blk virt */ 17298c2ecf20Sopenharmony_ci dma_addr_t rcv_block_phys; /* LLC host receive queue buf blk phys */ 17308c2ecf20Sopenharmony_ci PI_CONSUMER_BLOCK *cons_block_virt; /* PDQ consumer block virt address */ 17318c2ecf20Sopenharmony_ci dma_addr_t cons_block_phys; /* PDQ consumer block phys address */ 17328c2ecf20Sopenharmony_ci 17338c2ecf20Sopenharmony_ci /* Keep local copies of Type 1 and Type 2 register data */ 17348c2ecf20Sopenharmony_ci 17358c2ecf20Sopenharmony_ci PI_TYPE_1_PROD_REG cmd_req_reg; /* Command Request register */ 17368c2ecf20Sopenharmony_ci PI_TYPE_1_PROD_REG cmd_rsp_reg; /* Command Response register */ 17378c2ecf20Sopenharmony_ci PI_TYPE_2_PROD_REG rcv_xmt_reg; /* Type 2 (RCV/XMT) register */ 17388c2ecf20Sopenharmony_ci 17398c2ecf20Sopenharmony_ci /* Storage for unicast and multicast address entries in adapter CAM */ 17408c2ecf20Sopenharmony_ci 17418c2ecf20Sopenharmony_ci u8 uc_table[1*FDDI_K_ALEN]; 17428c2ecf20Sopenharmony_ci u32 uc_count; /* number of unicast addresses */ 17438c2ecf20Sopenharmony_ci u8 mc_table[PI_CMD_ADDR_FILTER_K_SIZE*FDDI_K_ALEN]; 17448c2ecf20Sopenharmony_ci u32 mc_count; /* number of multicast addresses */ 17458c2ecf20Sopenharmony_ci 17468c2ecf20Sopenharmony_ci /* Current packet filter settings */ 17478c2ecf20Sopenharmony_ci 17488c2ecf20Sopenharmony_ci u32 ind_group_prom; /* LLC individual & group frame prom mode */ 17498c2ecf20Sopenharmony_ci u32 group_prom; /* LLC group (multicast) frame prom mode */ 17508c2ecf20Sopenharmony_ci 17518c2ecf20Sopenharmony_ci /* Link available flag needed to determine whether to drop outgoing packet requests */ 17528c2ecf20Sopenharmony_ci 17538c2ecf20Sopenharmony_ci u32 link_available; /* is link available? */ 17548c2ecf20Sopenharmony_ci 17558c2ecf20Sopenharmony_ci /* Resources to indicate reset type when resetting adapter */ 17568c2ecf20Sopenharmony_ci 17578c2ecf20Sopenharmony_ci u32 reset_type; /* skip or rerun diagnostics */ 17588c2ecf20Sopenharmony_ci 17598c2ecf20Sopenharmony_ci /* Store pointers to receive buffers for queue processing code */ 17608c2ecf20Sopenharmony_ci 17618c2ecf20Sopenharmony_ci char *p_rcv_buff_va[PI_RCV_DATA_K_NUM_ENTRIES]; 17628c2ecf20Sopenharmony_ci 17638c2ecf20Sopenharmony_ci /* Store pointers to transmit buffers for transmit completion code */ 17648c2ecf20Sopenharmony_ci 17658c2ecf20Sopenharmony_ci XMT_DRIVER_DESCR xmt_drv_descr_blk[PI_XMT_DATA_K_NUM_ENTRIES]; 17668c2ecf20Sopenharmony_ci 17678c2ecf20Sopenharmony_ci /* Transmit spinlocks */ 17688c2ecf20Sopenharmony_ci 17698c2ecf20Sopenharmony_ci spinlock_t lock; 17708c2ecf20Sopenharmony_ci 17718c2ecf20Sopenharmony_ci /* Store device, bus-specific, and parameter information for this adapter */ 17728c2ecf20Sopenharmony_ci 17738c2ecf20Sopenharmony_ci struct net_device *dev; /* pointer to device structure */ 17748c2ecf20Sopenharmony_ci union { 17758c2ecf20Sopenharmony_ci void __iomem *mem; 17768c2ecf20Sopenharmony_ci int port; 17778c2ecf20Sopenharmony_ci } base; /* base address */ 17788c2ecf20Sopenharmony_ci struct device *bus_dev; 17798c2ecf20Sopenharmony_ci u32 full_duplex_enb; /* FDDI Full Duplex enable (1 == on, 2 == off) */ 17808c2ecf20Sopenharmony_ci u32 req_ttrt; /* requested TTRT value (in 80ns units) */ 17818c2ecf20Sopenharmony_ci u32 burst_size; /* adapter burst size (enumerated) */ 17828c2ecf20Sopenharmony_ci u32 rcv_bufs_to_post; /* receive buffers to post for LLC host queue */ 17838c2ecf20Sopenharmony_ci u8 factory_mac_addr[FDDI_K_ALEN]; /* factory (on-board) MAC address */ 17848c2ecf20Sopenharmony_ci 17858c2ecf20Sopenharmony_ci /* Common FDDI statistics structure and private counters */ 17868c2ecf20Sopenharmony_ci 17878c2ecf20Sopenharmony_ci struct fddi_statistics stats; 17888c2ecf20Sopenharmony_ci 17898c2ecf20Sopenharmony_ci u32 rcv_discards; 17908c2ecf20Sopenharmony_ci u32 rcv_crc_errors; 17918c2ecf20Sopenharmony_ci u32 rcv_frame_status_errors; 17928c2ecf20Sopenharmony_ci u32 rcv_length_errors; 17938c2ecf20Sopenharmony_ci u32 rcv_total_frames; 17948c2ecf20Sopenharmony_ci u32 rcv_multicast_frames; 17958c2ecf20Sopenharmony_ci u32 rcv_total_bytes; 17968c2ecf20Sopenharmony_ci 17978c2ecf20Sopenharmony_ci u32 xmt_discards; 17988c2ecf20Sopenharmony_ci u32 xmt_length_errors; 17998c2ecf20Sopenharmony_ci u32 xmt_total_frames; 18008c2ecf20Sopenharmony_ci u32 xmt_total_bytes; 18018c2ecf20Sopenharmony_ci } DFX_board_t; 18028c2ecf20Sopenharmony_ci 18038c2ecf20Sopenharmony_ci#endif /* #ifndef _DEFXX_H_ */ 1804