wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * |
| 3 | * Name: skgepnmi.h |
| 4 | * Project: GEnesis, PCI Gigabit Ethernet Adapter |
| 5 | * Version: $Revision: 1.59 $ |
| 6 | * Date: $Date: 2002/12/16 14:03:50 $ |
| 7 | * Purpose: Defines for Private Network Management Interface |
| 8 | * |
| 9 | ****************************************************************************/ |
| 10 | |
| 11 | /****************************************************************************** |
| 12 | * |
| 13 | * (C)Copyright 1998-2001 SysKonnect GmbH. |
| 14 | * |
| 15 | * This program is free software; you can redistribute it and/or modify |
| 16 | * it under the terms of the GNU General Public License as published by |
| 17 | * the Free Software Foundation; either version 2 of the License, or |
| 18 | * (at your option) any later version. |
| 19 | * |
| 20 | * The information in this file is provided "AS IS" without warranty. |
| 21 | * |
| 22 | ******************************************************************************/ |
| 23 | |
| 24 | /***************************************************************************** |
| 25 | * |
| 26 | * History: |
| 27 | * |
| 28 | * $Log: skgepnmi.h,v $ |
| 29 | * Revision 1.59 2002/12/16 14:03:50 tschilli |
| 30 | * New defines for VCT added. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 31 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 32 | * Revision 1.58 2002/12/16 09:04:59 tschilli |
| 33 | * Code for VCT handling added. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 34 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 35 | * Revision 1.57 2002/09/26 12:41:05 tschilli |
| 36 | * SK_PNMI_PORT BufPort entry in struct SK_PNMI added. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 37 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 38 | * Revision 1.56 2002/08/16 11:10:41 rwahl |
| 39 | * - Replaced c++ comment. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 40 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 41 | * Revision 1.55 2002/08/09 15:40:21 rwahl |
| 42 | * Editorial change (renamed ConfSpeedCap). |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 43 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 44 | * Revision 1.54 2002/08/09 11:06:07 rwahl |
| 45 | * Added OID_SKGE_SPEED_CAP. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 46 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 47 | * Revision 1.53 2002/08/09 09:45:28 rwahl |
| 48 | * Added support for NDIS OID_PNP_xxx. |
| 49 | * Editorial changes. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 50 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 51 | * Revision 1.52 2002/08/06 17:54:07 rwahl |
| 52 | * - Added speed cap to PNMI config struct. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 53 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 54 | * Revision 1.51 2002/07/17 19:19:26 rwahl |
| 55 | * - Added OID_SKGE_SPEED_MODE and OID_SKGE_SPEED_STATUS. |
| 56 | * - Added SK_PNMI_CNT_RX_PMACC_ERR() & SK_PNMI_CNT_RX_LONGFRAMES(). |
| 57 | * - Added speed mode & status to PNMI config struct. |
| 58 | * - Editorial changes. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 59 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 60 | * Revision 1.50 2002/05/22 08:59:37 rwahl |
| 61 | * Added string definitions for error msgs. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 62 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 63 | * Revision 1.49 2001/11/20 09:23:50 rwahl |
| 64 | * - pnmi struct: reordered and aligned to 32bit. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 65 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 66 | * Revision 1.48 2001/02/23 14:34:24 mkunz |
| 67 | * Changed macro PHYS2INST. Added pAC to Interface |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 68 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 69 | * Revision 1.47 2001/02/07 08:28:23 mkunz |
| 70 | * - Added Oids: OID_SKGE_DIAG_ACTION |
| 71 | * OID_SKGE_DIAG_RESULT |
| 72 | * OID_SKGE_MULTICAST_LIST |
| 73 | * OID_SKGE_CURRENT_PACKET_FILTER |
| 74 | * OID_SKGE_INTERMEDIATE_SUPPORT |
| 75 | * - Changed value of OID_SKGE_MTU |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 76 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 77 | * Revision 1.46 2001/02/06 10:01:41 mkunz |
| 78 | * - Pnmi V4 dual net support added. Interface functions and macros extended |
| 79 | * - Vpd bug fixed |
| 80 | * - OID_SKGE_MTU added |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 81 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 82 | * Revision 1.45 2001/01/22 13:41:37 rassmann |
| 83 | * Supporting two nets on dual-port adapters. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 84 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 85 | * Revision 1.44 2000/09/07 07:35:27 rwahl |
| 86 | * - removed NDIS counter specific data type. |
| 87 | * - fixed spelling for OID_SKGE_RLMT_PORT_PREFERRED. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 88 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 89 | * Revision 1.43 2000/08/04 11:41:08 rwahl |
| 90 | * - Fixed compiler warning (port is always >= 0) for macros |
| 91 | * SK_PNMI_CNT_RX_LONGFRAMES & SK_PNMI_CNT_SYNC_OCTETS |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 92 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 93 | * Revision 1.42 2000/08/03 15:14:07 rwahl |
| 94 | * - Corrected error in driver macros addressing a physical port. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 95 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 96 | * Revision 1.41 2000/08/01 16:22:29 rwahl |
| 97 | * - Changed MDB version to 3.1. |
| 98 | * - Added definitions for StatRxLongFrames counter. |
| 99 | * - Added macro to be used by driver to count long frames received. |
| 100 | * - Added directive to control width (default = 32bit) of NDIS statistic |
| 101 | * counters (SK_NDIS_64BIT_CTR). |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 102 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 103 | * Revision 1.40 2000/03/31 13:51:34 rwahl |
| 104 | * Added SK_UPTR cast to offset calculation for PNMI struct fields; |
| 105 | * missing cast caused compiler warnings by Win64 compiler. |
| 106 | * |
| 107 | * Revision 1.39 1999/12/06 10:09:47 rwahl |
| 108 | * Added new error log message. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 109 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 110 | * Revision 1.38 1999/11/22 13:57:55 cgoos |
| 111 | * Changed license header to GPL. |
| 112 | * |
| 113 | * Revision 1.37 1999/09/14 14:25:32 rwahl |
| 114 | * Set MDB version for 1000Base-T (sensors, Master/Slave) changes. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 115 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 116 | * Revision 1.36 1999/05/20 09:24:56 cgoos |
| 117 | * Changes for 1000Base-T (sensors, Master/Slave). |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 118 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 119 | * Revision 1.35 1999/04/13 15:10:51 mhaveman |
| 120 | * Replaced RLMT macros SK_RLMT_CHECK_xxx again by those of PNMI to |
| 121 | * grant unified interface. But PNMI macros will store the same |
| 122 | * value as RLMT macros. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 123 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 124 | * Revision 1.34 1999/04/13 15:03:49 mhaveman |
| 125 | * -Changed copyright |
| 126 | * -Removed SK_PNMI_RLMT_MODE_CHK_xxx macros. Those of RLMT should be |
| 127 | * used. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 128 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 129 | * Revision 1.33 1999/03/23 10:41:02 mhaveman |
| 130 | * Changed comments. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 131 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 132 | * Revision 1.32 1999/01/25 15:01:33 mhaveman |
| 133 | * Added support for multiple simultaniously active ports. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 134 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 135 | * Revision 1.31 1999/01/19 10:06:26 mhaveman |
| 136 | * Added new error log message. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 137 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 138 | * Revision 1.30 1999/01/05 10:34:49 mhaveman |
| 139 | * Fixed little error in RlmtChangeEstimate calculation. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 140 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 141 | * Revision 1.29 1999/01/05 09:59:41 mhaveman |
| 142 | * Redesigned port switch average calculation to avoid 64bit |
| 143 | * arithmetic. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 144 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 145 | * Revision 1.28 1998/12/08 10:05:48 mhaveman |
| 146 | * Defined macro SK_PNMI_MIN_STRUCT_SIZE. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 147 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 148 | * Revision 1.27 1998/12/03 14:39:35 mhaveman |
| 149 | * Fixed problem that LSTAT was enumerated wrong. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 150 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 151 | * Revision 1.26 1998/12/03 11:19:51 mhaveman |
| 152 | * Changed contents of errlog message SK_PNMI_ERR016MSG |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 153 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 154 | * Revision 1.25 1998/12/01 10:40:04 mhaveman |
| 155 | * Changed size of SensorNumber, ChecksumNumber and RlmtPortNumber in |
| 156 | * SK_PNMI_STRUCT_DATA to be conform with OID definition. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 157 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 158 | * Revision 1.24 1998/11/20 08:09:27 mhaveman |
| 159 | * Added macros to convert between logical, physical port indexes and |
| 160 | * instances. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 161 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 162 | * Revision 1.23 1998/11/10 13:41:13 mhaveman |
| 163 | * Needed to change interface, because NT driver needs a return value |
| 164 | * of needed buffer space on TOO_SHORT errors. Therefore all |
| 165 | * SkPnmiGet/Preset/Set functions now have a pointer to the length |
| 166 | * parameter, where the needed space on error is returned. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 167 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 168 | * Revision 1.22 1998/11/03 12:05:51 mhaveman |
| 169 | * Added pAC parameter to counter macors. |
| 170 | * |
| 171 | * Revision 1.21 1998/11/02 10:47:36 mhaveman |
| 172 | * Added syslog messages for internal errors. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 173 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 174 | * Revision 1.20 1998/10/30 15:49:36 mhaveman |
| 175 | * -Removed unused SK_PNMI_UTILIZATION_BASE and EstOldCnt. |
| 176 | * -Redefined SK_PNMI_CHG_EST_BASE to hundreds of seconds. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 177 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 178 | * Revision 1.19 1998/10/29 15:38:44 mhaveman |
| 179 | * Changed string lengths of PNMI_STRUCT_DATA structure because |
| 180 | * string OIDs are now encoded with leading length ocetet. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 181 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 182 | * Revision 1.18 1998/10/29 08:52:27 mhaveman |
| 183 | * -Added byte to strings in PNMI_STRUCT_DATA structure. |
| 184 | * -Shortened SK_PNMI_RLMT structure to SK_MAX_MACS elements. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 185 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 186 | * Revision 1.17 1998/10/28 08:49:50 mhaveman |
| 187 | * -Changed type of Instance back to SK_U32 because of VPD |
| 188 | * -Changed type from SK_U8 to char of PciBusSpeed, PciBusWidth, PMD, |
| 189 | * and Connector. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 190 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 191 | * Revision 1.16 1998/10/22 10:42:31 mhaveman |
| 192 | * -Removed (SK_U32) casts for OIDs |
| 193 | * -excluded NDIS OIDs when they are already defined with ifndef _NDIS_ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 194 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 195 | * Revision 1.15 1998/10/20 13:56:28 mhaveman |
| 196 | * Headerfile includes now directly other header files to comile correctly. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 197 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 198 | * Revision 1.14 1998/10/20 07:31:09 mhaveman |
| 199 | * Made type changes to unsigned int where possible. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 200 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 201 | * Revision 1.13 1998/10/19 10:53:13 mhaveman |
| 202 | * -Casted OID definitions to SK_U32 |
| 203 | * -Renamed RlmtMAC... to RlmtPort... |
| 204 | * -Changed wrong type of VpdEntriesList from SK_U32 to char * |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 205 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 206 | * Revision 1.12 1998/10/13 07:42:27 mhaveman |
| 207 | * -Added OIDs OID_SKGE_TRAP_NUMBER and OID_SKGE_ALL_DATA |
| 208 | * -Removed old cvs history entries |
| 209 | * -Renamed MacNumber to PortNumber |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 210 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 211 | * Revision 1.11 1998/10/07 10:55:24 mhaveman |
| 212 | * -Added OID_MDB_VERSION. Therefore was a renumbering of the VPD OIDs |
| 213 | * necessary. |
| 214 | * -Added OID_GEN_ Ids to support the windows driver. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 215 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 216 | * Revision 1.10 1998/09/30 13:41:10 mhaveman |
| 217 | * Renamed some OIDs to reduce usage of 'MAC' which is replaced by 'PORT'. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 218 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 219 | * Revision 1.9 1998/09/04 17:06:17 mhaveman |
| 220 | * -Added SyncCounter as macro. |
| 221 | * -Renamed OID_SKGE_.._NO_DESCR_CTS to OID_SKGE_.._NO_BUF_CTS. |
| 222 | * -Added macros for driver description and version strings. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 223 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 224 | * Revision 1.8 1998/09/04 14:36:52 mhaveman |
| 225 | * Added OIDs and Structure to access value of macro counters which are |
| 226 | * counted by the driver. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 227 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 228 | * Revision 1.7 1998/09/04 11:59:36 mhaveman |
| 229 | * Everything compiles now. Driver Macros for counting still missing. |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 230 | * |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 231 | ****************************************************************************/ |
| 232 | |
| 233 | #ifndef _SKGEPNMI_H_ |
| 234 | #define _SKGEPNMI_H_ |
| 235 | |
| 236 | /* |
| 237 | * Include dependencies |
| 238 | */ |
| 239 | #include "h/sktypes.h" |
| 240 | #include "h/skerror.h" |
| 241 | #include "h/sktimer.h" |
| 242 | #include "h/ski2c.h" |
| 243 | #include "h/skaddr.h" |
| 244 | #include "h/skrlmt.h" |
| 245 | #include "h/skvpd.h" |
| 246 | |
| 247 | /* |
| 248 | * Management Database Version |
| 249 | */ |
| 250 | #define SK_PNMI_MDB_VERSION 0x00030001 /* 3.1 */ |
| 251 | |
| 252 | |
| 253 | /* |
| 254 | * Event definitions |
| 255 | */ |
| 256 | #define SK_PNMI_EVT_SIRQ_OVERFLOW 1 /* Counter overflow */ |
| 257 | #define SK_PNMI_EVT_SEN_WAR_LOW 2 /* Lower war thres exceeded */ |
| 258 | #define SK_PNMI_EVT_SEN_WAR_UPP 3 /* Upper war thres exceeded */ |
| 259 | #define SK_PNMI_EVT_SEN_ERR_LOW 4 /* Lower err thres exceeded */ |
| 260 | #define SK_PNMI_EVT_SEN_ERR_UPP 5 /* Upper err thres exceeded */ |
| 261 | #define SK_PNMI_EVT_CHG_EST_TIMER 6 /* Timer event for RLMT Chg */ |
| 262 | #define SK_PNMI_EVT_UTILIZATION_TIMER 7 /* Timer event for Utiliza. */ |
| 263 | #define SK_PNMI_EVT_CLEAR_COUNTER 8 /* Clear statistic counters */ |
| 264 | #define SK_PNMI_EVT_XMAC_RESET 9 /* XMAC will be reset */ |
| 265 | |
| 266 | #define SK_PNMI_EVT_RLMT_PORT_UP 10 /* Port came logically up */ |
| 267 | #define SK_PNMI_EVT_RLMT_PORT_DOWN 11 /* Port went logically down */ |
| 268 | #define SK_PNMI_EVT_RLMT_SEGMENTATION 13 /* Two SP root bridges found */ |
| 269 | #define SK_PNMI_EVT_RLMT_ACTIVE_DOWN 14 /* Port went logically down */ |
| 270 | #define SK_PNMI_EVT_RLMT_ACTIVE_UP 15 /* Port came logically up */ |
| 271 | #define SK_PNMI_EVT_RLMT_SET_NETS 16 /* 1. Parameter is number of nets |
| 272 | 1 = single net; 2 = dual net */ |
| 273 | #define SK_PNMI_EVT_VCT_RESET 17 /* VCT port reset timer event started with SET. */ |
| 274 | |
| 275 | |
| 276 | /* |
| 277 | * Return values |
| 278 | */ |
| 279 | #define SK_PNMI_ERR_OK 0 |
| 280 | #define SK_PNMI_ERR_GENERAL 1 |
| 281 | #define SK_PNMI_ERR_TOO_SHORT 2 |
| 282 | #define SK_PNMI_ERR_BAD_VALUE 3 |
| 283 | #define SK_PNMI_ERR_READ_ONLY 4 |
| 284 | #define SK_PNMI_ERR_UNKNOWN_OID 5 |
| 285 | #define SK_PNMI_ERR_UNKNOWN_INST 6 |
| 286 | #define SK_PNMI_ERR_UNKNOWN_NET 7 |
| 287 | |
| 288 | |
| 289 | /* |
| 290 | * Return values of driver reset function SK_DRIVER_RESET() and |
| 291 | * driver event function SK_DRIVER_EVENT() |
| 292 | */ |
| 293 | #define SK_PNMI_ERR_OK 0 |
| 294 | #define SK_PNMI_ERR_FAIL 1 |
| 295 | |
| 296 | |
| 297 | /* |
| 298 | * Return values of driver test function SK_DRIVER_SELFTEST() |
| 299 | */ |
| 300 | #define SK_PNMI_TST_UNKNOWN (1 << 0) |
| 301 | #define SK_PNMI_TST_TRANCEIVER (1 << 1) |
| 302 | #define SK_PNMI_TST_ASIC (1 << 2) |
| 303 | #define SK_PNMI_TST_SENSOR (1 << 3) |
| 304 | #define SK_PNMI_TST_POWERMGMT (1 << 4) |
| 305 | #define SK_PNMI_TST_PCI (1 << 5) |
| 306 | #define SK_PNMI_TST_MAC (1 << 6) |
| 307 | |
| 308 | |
| 309 | /* |
| 310 | * RLMT specific definitions |
| 311 | */ |
| 312 | #define SK_PNMI_RLMT_STATUS_STANDBY 1 |
| 313 | #define SK_PNMI_RLMT_STATUS_ACTIVE 2 |
| 314 | #define SK_PNMI_RLMT_STATUS_ERROR 3 |
| 315 | |
| 316 | #define SK_PNMI_RLMT_LSTAT_PHY_DOWN 1 |
| 317 | #define SK_PNMI_RLMT_LSTAT_AUTONEG 2 |
| 318 | #define SK_PNMI_RLMT_LSTAT_LOG_DOWN 3 |
| 319 | #define SK_PNMI_RLMT_LSTAT_LOG_UP 4 |
| 320 | #define SK_PNMI_RLMT_LSTAT_INDETERMINATED 5 |
| 321 | |
| 322 | #define SK_PNMI_RLMT_MODE_CHK_LINK (SK_RLMT_CHECK_LINK) |
| 323 | #define SK_PNMI_RLMT_MODE_CHK_RX (SK_RLMT_CHECK_LOC_LINK) |
| 324 | #define SK_PNMI_RLMT_MODE_CHK_SPT (SK_RLMT_CHECK_SEG) |
| 325 | /* #define SK_PNMI_RLMT_MODE_CHK_EX */ |
| 326 | |
| 327 | /* |
| 328 | * OID definition |
| 329 | */ |
| 330 | #ifndef _NDIS_ /* Check, whether NDIS already included OIDs */ |
| 331 | |
| 332 | #define OID_GEN_XMIT_OK 0x00020101 |
| 333 | #define OID_GEN_RCV_OK 0x00020102 |
| 334 | #define OID_GEN_XMIT_ERROR 0x00020103 |
| 335 | #define OID_GEN_RCV_ERROR 0x00020104 |
| 336 | #define OID_GEN_RCV_NO_BUFFER 0x00020105 |
| 337 | |
| 338 | /* #define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201 */ |
| 339 | #define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202 |
| 340 | /* #define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203 */ |
| 341 | #define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204 |
| 342 | /* #define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205 */ |
| 343 | #define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206 |
| 344 | /* #define OID_GEN_DIRECTED_BYTES_RCV 0x00020207 */ |
| 345 | #define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208 |
| 346 | /* #define OID_GEN_MULTICAST_BYTES_RCV 0x00020209 */ |
| 347 | #define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A |
| 348 | /* #define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B */ |
| 349 | #define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C |
| 350 | #define OID_GEN_RCV_CRC_ERROR 0x0002020D |
| 351 | #define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E |
| 352 | |
| 353 | #define OID_802_3_PERMANENT_ADDRESS 0x01010101 |
| 354 | #define OID_802_3_CURRENT_ADDRESS 0x01010102 |
| 355 | /* #define OID_802_3_MULTICAST_LIST 0x01010103 */ |
| 356 | /* #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 */ |
| 357 | /* #define OID_802_3_MAC_OPTIONS 0x01010105 */ |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 358 | |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 359 | #define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101 |
| 360 | #define OID_802_3_XMIT_ONE_COLLISION 0x01020102 |
| 361 | #define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103 |
| 362 | #define OID_802_3_XMIT_DEFERRED 0x01020201 |
| 363 | #define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202 |
| 364 | #define OID_802_3_RCV_OVERRUN 0x01020203 |
| 365 | #define OID_802_3_XMIT_UNDERRUN 0x01020204 |
| 366 | #define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206 |
| 367 | #define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207 |
| 368 | |
| 369 | /* |
| 370 | * PnP and PM OIDs |
| 371 | */ |
| 372 | #ifdef SK_POWER_MGMT |
| 373 | #define OID_PNP_CAPABILITIES 0xFD010100 |
| 374 | #define OID_PNP_SET_POWER 0xFD010101 |
| 375 | #define OID_PNP_QUERY_POWER 0xFD010102 |
| 376 | #define OID_PNP_ADD_WAKE_UP_PATTERN 0xFD010103 |
| 377 | #define OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104 |
| 378 | #define OID_PNP_ENABLE_WAKE_UP 0xFD010106 |
| 379 | #endif /* SK_POWER_MGMT */ |
| 380 | |
| 381 | #endif /* _NDIS_ */ |
| 382 | |
| 383 | #define OID_SKGE_MDB_VERSION 0xFF010100 |
| 384 | #define OID_SKGE_SUPPORTED_LIST 0xFF010101 |
| 385 | #define OID_SKGE_VPD_FREE_BYTES 0xFF010102 |
| 386 | #define OID_SKGE_VPD_ENTRIES_LIST 0xFF010103 |
| 387 | #define OID_SKGE_VPD_ENTRIES_NUMBER 0xFF010104 |
| 388 | #define OID_SKGE_VPD_KEY 0xFF010105 |
| 389 | #define OID_SKGE_VPD_VALUE 0xFF010106 |
| 390 | #define OID_SKGE_VPD_ACCESS 0xFF010107 |
| 391 | #define OID_SKGE_VPD_ACTION 0xFF010108 |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 392 | |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 393 | #define OID_SKGE_PORT_NUMBER 0xFF010110 |
| 394 | #define OID_SKGE_DEVICE_TYPE 0xFF010111 |
| 395 | #define OID_SKGE_DRIVER_DESCR 0xFF010112 |
| 396 | #define OID_SKGE_DRIVER_VERSION 0xFF010113 |
| 397 | #define OID_SKGE_HW_DESCR 0xFF010114 |
| 398 | #define OID_SKGE_HW_VERSION 0xFF010115 |
| 399 | #define OID_SKGE_CHIPSET 0xFF010116 |
| 400 | #define OID_SKGE_ACTION 0xFF010117 |
| 401 | #define OID_SKGE_RESULT 0xFF010118 |
| 402 | #define OID_SKGE_BUS_TYPE 0xFF010119 |
| 403 | #define OID_SKGE_BUS_SPEED 0xFF01011A |
| 404 | #define OID_SKGE_BUS_WIDTH 0xFF01011B |
| 405 | /* 0xFF01011C unused */ |
| 406 | #define OID_SKGE_DIAG_ACTION 0xFF01011D |
| 407 | #define OID_SKGE_DIAG_RESULT 0xFF01011E |
| 408 | #define OID_SKGE_MTU 0xFF01011F |
| 409 | #define OID_SKGE_PHYS_CUR_ADDR 0xFF010120 |
| 410 | #define OID_SKGE_PHYS_FAC_ADDR 0xFF010121 |
| 411 | #define OID_SKGE_PMD 0xFF010122 |
| 412 | #define OID_SKGE_CONNECTOR 0xFF010123 |
| 413 | #define OID_SKGE_LINK_CAP 0xFF010124 |
| 414 | #define OID_SKGE_LINK_MODE 0xFF010125 |
| 415 | #define OID_SKGE_LINK_MODE_STATUS 0xFF010126 |
| 416 | #define OID_SKGE_LINK_STATUS 0xFF010127 |
| 417 | #define OID_SKGE_FLOWCTRL_CAP 0xFF010128 |
| 418 | #define OID_SKGE_FLOWCTRL_MODE 0xFF010129 |
| 419 | #define OID_SKGE_FLOWCTRL_STATUS 0xFF01012A |
| 420 | #define OID_SKGE_PHY_OPERATION_CAP 0xFF01012B |
| 421 | #define OID_SKGE_PHY_OPERATION_MODE 0xFF01012C |
| 422 | #define OID_SKGE_PHY_OPERATION_STATUS 0xFF01012D |
| 423 | #define OID_SKGE_MULTICAST_LIST 0xFF01012E |
| 424 | #define OID_SKGE_CURRENT_PACKET_FILTER 0xFF01012F |
| 425 | |
| 426 | #define OID_SKGE_TRAP 0xFF010130 |
| 427 | #define OID_SKGE_TRAP_NUMBER 0xFF010131 |
| 428 | |
| 429 | #define OID_SKGE_RLMT_MODE 0xFF010140 |
| 430 | #define OID_SKGE_RLMT_PORT_NUMBER 0xFF010141 |
| 431 | #define OID_SKGE_RLMT_PORT_ACTIVE 0xFF010142 |
| 432 | #define OID_SKGE_RLMT_PORT_PREFERRED 0xFF010143 |
| 433 | #define OID_SKGE_INTERMEDIATE_SUPPORT 0xFF010160 |
| 434 | |
| 435 | #define OID_SKGE_SPEED_CAP 0xFF010170 |
| 436 | #define OID_SKGE_SPEED_MODE 0xFF010171 |
| 437 | #define OID_SKGE_SPEED_STATUS 0xFF010172 |
| 438 | |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 439 | #define OID_SKGE_SENSOR_NUMBER 0xFF020100 |
wdenk | 7152b1d | 2003-09-05 23:19:14 +0000 | [diff] [blame] | 440 | #define OID_SKGE_SENSOR_INDEX 0xFF020101 |
| 441 | #define OID_SKGE_SENSOR_DESCR 0xFF020102 |
| 442 | #define OID_SKGE_SENSOR_TYPE 0xFF020103 |
| 443 | #define OID_SKGE_SENSOR_VALUE 0xFF020104 |
| 444 | #define OID_SKGE_SENSOR_WAR_THRES_LOW 0xFF020105 |
| 445 | #define OID_SKGE_SENSOR_WAR_THRES_UPP 0xFF020106 |
| 446 | #define OID_SKGE_SENSOR_ERR_THRES_LOW 0xFF020107 |
| 447 | #define OID_SKGE_SENSOR_ERR_THRES_UPP 0xFF020108 |
| 448 | #define OID_SKGE_SENSOR_STATUS 0xFF020109 |
| 449 | #define OID_SKGE_SENSOR_WAR_CTS 0xFF02010A |
| 450 | #define OID_SKGE_SENSOR_ERR_CTS 0xFF02010B |
| 451 | #define OID_SKGE_SENSOR_WAR_TIME 0xFF02010C |
| 452 | #define OID_SKGE_SENSOR_ERR_TIME 0xFF02010D |
| 453 | |
| 454 | #define OID_SKGE_CHKSM_NUMBER 0xFF020110 |
| 455 | #define OID_SKGE_CHKSM_RX_OK_CTS 0xFF020111 |
| 456 | #define OID_SKGE_CHKSM_RX_UNABLE_CTS 0xFF020112 |
| 457 | #define OID_SKGE_CHKSM_RX_ERR_CTS 0xFF020113 |
| 458 | #define OID_SKGE_CHKSM_TX_OK_CTS 0xFF020114 |
| 459 | #define OID_SKGE_CHKSM_TX_UNABLE_CTS 0xFF020115 |
| 460 | |
| 461 | #define OID_SKGE_STAT_TX 0xFF020120 |
| 462 | #define OID_SKGE_STAT_TX_OCTETS 0xFF020121 |
| 463 | #define OID_SKGE_STAT_TX_BROADCAST 0xFF020122 |
| 464 | #define OID_SKGE_STAT_TX_MULTICAST 0xFF020123 |
| 465 | #define OID_SKGE_STAT_TX_UNICAST 0xFF020124 |
| 466 | #define OID_SKGE_STAT_TX_LONGFRAMES 0xFF020125 |
| 467 | #define OID_SKGE_STAT_TX_BURST 0xFF020126 |
| 468 | #define OID_SKGE_STAT_TX_PFLOWC 0xFF020127 |
| 469 | #define OID_SKGE_STAT_TX_FLOWC 0xFF020128 |
| 470 | #define OID_SKGE_STAT_TX_SINGLE_COL 0xFF020129 |
| 471 | #define OID_SKGE_STAT_TX_MULTI_COL 0xFF02012A |
| 472 | #define OID_SKGE_STAT_TX_EXCESS_COL 0xFF02012B |
| 473 | #define OID_SKGE_STAT_TX_LATE_COL 0xFF02012C |
| 474 | #define OID_SKGE_STAT_TX_DEFFERAL 0xFF02012D |
| 475 | #define OID_SKGE_STAT_TX_EXCESS_DEF 0xFF02012E |
| 476 | #define OID_SKGE_STAT_TX_UNDERRUN 0xFF02012F |
| 477 | #define OID_SKGE_STAT_TX_CARRIER 0xFF020130 |
| 478 | /* #define OID_SKGE_STAT_TX_UTIL 0xFF020131 */ |
| 479 | #define OID_SKGE_STAT_TX_64 0xFF020132 |
| 480 | #define OID_SKGE_STAT_TX_127 0xFF020133 |
| 481 | #define OID_SKGE_STAT_TX_255 0xFF020134 |
| 482 | #define OID_SKGE_STAT_TX_511 0xFF020135 |
| 483 | #define OID_SKGE_STAT_TX_1023 0xFF020136 |
| 484 | #define OID_SKGE_STAT_TX_MAX 0xFF020137 |
| 485 | #define OID_SKGE_STAT_TX_SYNC 0xFF020138 |
| 486 | #define OID_SKGE_STAT_TX_SYNC_OCTETS 0xFF020139 |
| 487 | #define OID_SKGE_STAT_RX 0xFF02013A |
| 488 | #define OID_SKGE_STAT_RX_OCTETS 0xFF02013B |
| 489 | #define OID_SKGE_STAT_RX_BROADCAST 0xFF02013C |
| 490 | #define OID_SKGE_STAT_RX_MULTICAST 0xFF02013D |
| 491 | #define OID_SKGE_STAT_RX_UNICAST 0xFF02013E |
| 492 | #define OID_SKGE_STAT_RX_PFLOWC 0xFF02013F |
| 493 | #define OID_SKGE_STAT_RX_FLOWC 0xFF020140 |
| 494 | #define OID_SKGE_STAT_RX_PFLOWC_ERR 0xFF020141 |
| 495 | #define OID_SKGE_STAT_RX_FLOWC_UNKWN 0xFF020142 |
| 496 | #define OID_SKGE_STAT_RX_BURST 0xFF020143 |
| 497 | #define OID_SKGE_STAT_RX_MISSED 0xFF020144 |
| 498 | #define OID_SKGE_STAT_RX_FRAMING 0xFF020145 |
| 499 | #define OID_SKGE_STAT_RX_OVERFLOW 0xFF020146 |
| 500 | #define OID_SKGE_STAT_RX_JABBER 0xFF020147 |
| 501 | #define OID_SKGE_STAT_RX_CARRIER 0xFF020148 |
| 502 | #define OID_SKGE_STAT_RX_IR_LENGTH 0xFF020149 |
| 503 | #define OID_SKGE_STAT_RX_SYMBOL 0xFF02014A |
| 504 | #define OID_SKGE_STAT_RX_SHORTS 0xFF02014B |
| 505 | #define OID_SKGE_STAT_RX_RUNT 0xFF02014C |
| 506 | #define OID_SKGE_STAT_RX_CEXT 0xFF02014D |
| 507 | #define OID_SKGE_STAT_RX_TOO_LONG 0xFF02014E |
| 508 | #define OID_SKGE_STAT_RX_FCS 0xFF02014F |
| 509 | /* #define OID_SKGE_STAT_RX_UTIL 0xFF020150 */ |
| 510 | #define OID_SKGE_STAT_RX_64 0xFF020151 |
| 511 | #define OID_SKGE_STAT_RX_127 0xFF020152 |
| 512 | #define OID_SKGE_STAT_RX_255 0xFF020153 |
| 513 | #define OID_SKGE_STAT_RX_511 0xFF020154 |
| 514 | #define OID_SKGE_STAT_RX_1023 0xFF020155 |
| 515 | #define OID_SKGE_STAT_RX_MAX 0xFF020156 |
| 516 | #define OID_SKGE_STAT_RX_LONGFRAMES 0xFF020157 |
| 517 | |
| 518 | #define OID_SKGE_RLMT_CHANGE_CTS 0xFF020160 |
| 519 | #define OID_SKGE_RLMT_CHANGE_TIME 0xFF020161 |
| 520 | #define OID_SKGE_RLMT_CHANGE_ESTIM 0xFF020162 |
| 521 | #define OID_SKGE_RLMT_CHANGE_THRES 0xFF020163 |
| 522 | |
| 523 | #define OID_SKGE_RLMT_PORT_INDEX 0xFF020164 |
| 524 | #define OID_SKGE_RLMT_STATUS 0xFF020165 |
| 525 | #define OID_SKGE_RLMT_TX_HELLO_CTS 0xFF020166 |
| 526 | #define OID_SKGE_RLMT_RX_HELLO_CTS 0xFF020167 |
| 527 | #define OID_SKGE_RLMT_TX_SP_REQ_CTS 0xFF020168 |
| 528 | #define OID_SKGE_RLMT_RX_SP_CTS 0xFF020169 |
| 529 | |
| 530 | #define OID_SKGE_RLMT_MONITOR_NUMBER 0xFF010150 |
| 531 | #define OID_SKGE_RLMT_MONITOR_INDEX 0xFF010151 |
| 532 | #define OID_SKGE_RLMT_MONITOR_ADDR 0xFF010152 |
| 533 | #define OID_SKGE_RLMT_MONITOR_ERRS 0xFF010153 |
| 534 | #define OID_SKGE_RLMT_MONITOR_TIMESTAMP 0xFF010154 |
| 535 | #define OID_SKGE_RLMT_MONITOR_ADMIN 0xFF010155 |
| 536 | |
| 537 | #define OID_SKGE_TX_SW_QUEUE_LEN 0xFF020170 |
| 538 | #define OID_SKGE_TX_SW_QUEUE_MAX 0xFF020171 |
| 539 | #define OID_SKGE_TX_RETRY 0xFF020172 |
| 540 | #define OID_SKGE_RX_INTR_CTS 0xFF020173 |
| 541 | #define OID_SKGE_TX_INTR_CTS 0xFF020174 |
| 542 | #define OID_SKGE_RX_NO_BUF_CTS 0xFF020175 |
| 543 | #define OID_SKGE_TX_NO_BUF_CTS 0xFF020176 |
| 544 | #define OID_SKGE_TX_USED_DESCR_NO 0xFF020177 |
| 545 | #define OID_SKGE_RX_DELIVERED_CTS 0xFF020178 |
| 546 | #define OID_SKGE_RX_OCTETS_DELIV_CTS 0xFF020179 |
| 547 | #define OID_SKGE_RX_HW_ERROR_CTS 0xFF02017A |
| 548 | #define OID_SKGE_TX_HW_ERROR_CTS 0xFF02017B |
| 549 | #define OID_SKGE_IN_ERRORS_CTS 0xFF02017C |
| 550 | #define OID_SKGE_OUT_ERROR_CTS 0xFF02017D |
| 551 | #define OID_SKGE_ERR_RECOVERY_CTS 0xFF02017E |
| 552 | #define OID_SKGE_SYSUPTIME 0xFF02017F |
| 553 | |
| 554 | #define OID_SKGE_ALL_DATA 0xFF020190 |
| 555 | |
| 556 | /* Defines for VCT. */ |
| 557 | #define OID_SKGE_VCT_GET 0xFF020200 |
| 558 | #define OID_SKGE_VCT_SET 0xFF020201 |
| 559 | #define OID_SKGE_VCT_STATUS 0xFF020202 |
| 560 | |
| 561 | |
| 562 | /* VCT struct to store a backup copy of VCT data after a port reset. */ |
| 563 | typedef struct s_PnmiVct { |
| 564 | SK_U8 VctStatus; |
| 565 | SK_U8 PCableLen; |
| 566 | SK_U32 PMdiPairLen[4]; |
| 567 | SK_U8 PMdiPairSts[4]; |
| 568 | } SK_PNMI_VCT; |
| 569 | |
| 570 | |
| 571 | /* VCT status values (to be given to CPA via OID_SKGE_VCT_STATUS). */ |
| 572 | #define SK_PNMI_VCT_NONE 0 |
| 573 | #define SK_PNMI_VCT_OLD_VCT_DATA 1 |
| 574 | #define SK_PNMI_VCT_NEW_VCT_DATA 2 |
| 575 | #define SK_PNMI_VCT_OLD_DSP_DATA 4 |
| 576 | #define SK_PNMI_VCT_NEW_DSP_DATA 8 |
| 577 | #define SK_PNMI_VCT_RUNNING 16 |
| 578 | |
| 579 | |
| 580 | /* VCT cable test status. */ |
| 581 | #define SK_PNMI_VCT_NORMAL_CABLE 0 |
| 582 | #define SK_PNMI_VCT_SHORT_CABLE 1 |
| 583 | #define SK_PNMI_VCT_OPEN_CABLE 2 |
| 584 | #define SK_PNMI_VCT_TEST_FAIL 3 |
| 585 | #define SK_PNMI_VCT_IMPEDANCE_MISMATCH 4 |
| 586 | |
| 587 | #define OID_SKGE_TRAP_SEN_WAR_LOW 500 |
| 588 | #define OID_SKGE_TRAP_SEN_WAR_UPP 501 |
| 589 | #define OID_SKGE_TRAP_SEN_ERR_LOW 502 |
| 590 | #define OID_SKGE_TRAP_SEN_ERR_UPP 503 |
| 591 | #define OID_SKGE_TRAP_RLMT_CHANGE_THRES 520 |
| 592 | #define OID_SKGE_TRAP_RLMT_CHANGE_PORT 521 |
| 593 | #define OID_SKGE_TRAP_RLMT_PORT_DOWN 522 |
| 594 | #define OID_SKGE_TRAP_RLMT_PORT_UP 523 |
| 595 | #define OID_SKGE_TRAP_RLMT_SEGMENTATION 524 |
| 596 | |
| 597 | |
| 598 | /* |
| 599 | * Define error numbers and messages for syslog |
| 600 | */ |
| 601 | #define SK_PNMI_ERR001 (SK_ERRBASE_PNMI + 1) |
| 602 | #define SK_PNMI_ERR001MSG "SkPnmiGetStruct: Unknown OID" |
| 603 | #define SK_PNMI_ERR002 (SK_ERRBASE_PNMI + 2) |
| 604 | #define SK_PNMI_ERR002MSG "SkPnmiGetStruct: Cannot read VPD keys" |
| 605 | #define SK_PNMI_ERR003 (SK_ERRBASE_PNMI + 3) |
| 606 | #define SK_PNMI_ERR003MSG "OidStruct: Called with wrong OID" |
| 607 | #define SK_PNMI_ERR004 (SK_ERRBASE_PNMI + 4) |
| 608 | #define SK_PNMI_ERR004MSG "OidStruct: Called with wrong action" |
| 609 | #define SK_PNMI_ERR005 (SK_ERRBASE_PNMI + 5) |
| 610 | #define SK_PNMI_ERR005MSG "Perform: Cannot reset driver" |
| 611 | #define SK_PNMI_ERR006 (SK_ERRBASE_PNMI + 6) |
| 612 | #define SK_PNMI_ERR006MSG "Perform: Unknown OID action command" |
| 613 | #define SK_PNMI_ERR007 (SK_ERRBASE_PNMI + 7) |
| 614 | #define SK_PNMI_ERR007MSG "General: Driver description not initialized" |
| 615 | #define SK_PNMI_ERR008 (SK_ERRBASE_PNMI + 8) |
| 616 | #define SK_PNMI_ERR008MSG "Addr: Tried to get unknown OID" |
| 617 | #define SK_PNMI_ERR009 (SK_ERRBASE_PNMI + 9) |
| 618 | #define SK_PNMI_ERR009MSG "Addr: Unknown OID" |
| 619 | #define SK_PNMI_ERR010 (SK_ERRBASE_PNMI + 10) |
| 620 | #define SK_PNMI_ERR010MSG "CsumStat: Unknown OID" |
| 621 | #define SK_PNMI_ERR011 (SK_ERRBASE_PNMI + 11) |
| 622 | #define SK_PNMI_ERR011MSG "SensorStat: Sensor descr string too long" |
| 623 | #define SK_PNMI_ERR012 (SK_ERRBASE_PNMI + 12) |
| 624 | #define SK_PNMI_ERR012MSG "SensorStat: Unknown OID" |
| 625 | #define SK_PNMI_ERR013 (SK_ERRBASE_PNMI + 13) |
| 626 | #define SK_PNMI_ERR013MSG "" |
| 627 | #define SK_PNMI_ERR014 (SK_ERRBASE_PNMI + 14) |
| 628 | #define SK_PNMI_ERR014MSG "Vpd: Cannot read VPD keys" |
| 629 | #define SK_PNMI_ERR015 (SK_ERRBASE_PNMI + 15) |
| 630 | #define SK_PNMI_ERR015MSG "Vpd: Internal array for VPD keys to small" |
| 631 | #define SK_PNMI_ERR016 (SK_ERRBASE_PNMI + 16) |
| 632 | #define SK_PNMI_ERR016MSG "Vpd: Key string too long" |
| 633 | #define SK_PNMI_ERR017 (SK_ERRBASE_PNMI + 17) |
| 634 | #define SK_PNMI_ERR017MSG "Vpd: Invalid VPD status pointer" |
| 635 | #define SK_PNMI_ERR018 (SK_ERRBASE_PNMI + 18) |
| 636 | #define SK_PNMI_ERR018MSG "Vpd: VPD data not valid" |
| 637 | #define SK_PNMI_ERR019 (SK_ERRBASE_PNMI + 19) |
| 638 | #define SK_PNMI_ERR019MSG "Vpd: VPD entries list string too long" |
| 639 | #define SK_PNMI_ERR021 (SK_ERRBASE_PNMI + 21) |
| 640 | #define SK_PNMI_ERR021MSG "Vpd: VPD data string too long" |
| 641 | #define SK_PNMI_ERR022 (SK_ERRBASE_PNMI + 22) |
| 642 | #define SK_PNMI_ERR022MSG "Vpd: VPD data string too long should be errored before" |
| 643 | #define SK_PNMI_ERR023 (SK_ERRBASE_PNMI + 23) |
| 644 | #define SK_PNMI_ERR023MSG "Vpd: Unknown OID in get action" |
| 645 | #define SK_PNMI_ERR024 (SK_ERRBASE_PNMI + 24) |
| 646 | #define SK_PNMI_ERR024MSG "Vpd: Unknown OID in preset/set action" |
| 647 | #define SK_PNMI_ERR025 (SK_ERRBASE_PNMI + 25) |
| 648 | #define SK_PNMI_ERR025MSG "Vpd: Cannot write VPD after modify entry" |
| 649 | #define SK_PNMI_ERR026 (SK_ERRBASE_PNMI + 26) |
| 650 | #define SK_PNMI_ERR026MSG "Vpd: Cannot update VPD" |
| 651 | #define SK_PNMI_ERR027 (SK_ERRBASE_PNMI + 27) |
| 652 | #define SK_PNMI_ERR027MSG "Vpd: Cannot delete VPD entry" |
| 653 | #define SK_PNMI_ERR028 (SK_ERRBASE_PNMI + 28) |
| 654 | #define SK_PNMI_ERR028MSG "Vpd: Cannot update VPD after delete entry" |
| 655 | #define SK_PNMI_ERR029 (SK_ERRBASE_PNMI + 29) |
| 656 | #define SK_PNMI_ERR029MSG "General: Driver description string too long" |
| 657 | #define SK_PNMI_ERR030 (SK_ERRBASE_PNMI + 30) |
| 658 | #define SK_PNMI_ERR030MSG "General: Driver version not initialized" |
| 659 | #define SK_PNMI_ERR031 (SK_ERRBASE_PNMI + 31) |
| 660 | #define SK_PNMI_ERR031MSG "General: Driver version string too long" |
| 661 | #define SK_PNMI_ERR032 (SK_ERRBASE_PNMI + 32) |
| 662 | #define SK_PNMI_ERR032MSG "General: Cannot read VPD Name for HW descr" |
| 663 | #define SK_PNMI_ERR033 (SK_ERRBASE_PNMI + 33) |
| 664 | #define SK_PNMI_ERR033MSG "General: HW description string too long" |
| 665 | #define SK_PNMI_ERR034 (SK_ERRBASE_PNMI + 34) |
| 666 | #define SK_PNMI_ERR034MSG "General: Unknown OID" |
| 667 | #define SK_PNMI_ERR035 (SK_ERRBASE_PNMI + 35) |
| 668 | #define SK_PNMI_ERR035MSG "Rlmt: Unknown OID" |
| 669 | #define SK_PNMI_ERR036 (SK_ERRBASE_PNMI + 36) |
| 670 | #define SK_PNMI_ERR036MSG "" |
| 671 | #define SK_PNMI_ERR037 (SK_ERRBASE_PNMI + 37) |
| 672 | #define SK_PNMI_ERR037MSG "Rlmt: SK_RLMT_MODE_CHANGE event return not 0" |
| 673 | #define SK_PNMI_ERR038 (SK_ERRBASE_PNMI + 38) |
| 674 | #define SK_PNMI_ERR038MSG "Rlmt: SK_RLMT_PREFPORT_CHANGE event return not 0" |
| 675 | #define SK_PNMI_ERR039 (SK_ERRBASE_PNMI + 39) |
| 676 | #define SK_PNMI_ERR039MSG "RlmtStat: Unknown OID" |
| 677 | #define SK_PNMI_ERR040 (SK_ERRBASE_PNMI + 40) |
| 678 | #define SK_PNMI_ERR040MSG "PowerManagement: Unknown OID" |
| 679 | #define SK_PNMI_ERR041 (SK_ERRBASE_PNMI + 41) |
| 680 | #define SK_PNMI_ERR041MSG "MacPrivateConf: Unknown OID" |
| 681 | #define SK_PNMI_ERR042 (SK_ERRBASE_PNMI + 42) |
| 682 | #define SK_PNMI_ERR042MSG "MacPrivateConf: SK_HWEV_SET_ROLE returned not 0" |
| 683 | #define SK_PNMI_ERR043 (SK_ERRBASE_PNMI + 43) |
| 684 | #define SK_PNMI_ERR043MSG "MacPrivateConf: SK_HWEV_SET_LMODE returned not 0" |
| 685 | #define SK_PNMI_ERR044 (SK_ERRBASE_PNMI + 44) |
| 686 | #define SK_PNMI_ERR044MSG "MacPrivateConf: SK_HWEV_SET_FLOWMODE returned not 0" |
| 687 | #define SK_PNMI_ERR045 (SK_ERRBASE_PNMI + 45) |
| 688 | #define SK_PNMI_ERR045MSG "MacPrivateConf: SK_HWEV_SET_SPEED returned not 0" |
| 689 | #define SK_PNMI_ERR046 (SK_ERRBASE_PNMI + 46) |
| 690 | #define SK_PNMI_ERR046MSG "Monitor: Unknown OID" |
| 691 | #define SK_PNMI_ERR047 (SK_ERRBASE_PNMI + 47) |
| 692 | #define SK_PNMI_ERR047MSG "SirqUpdate: Event function returns not 0" |
| 693 | #define SK_PNMI_ERR048 (SK_ERRBASE_PNMI + 48) |
| 694 | #define SK_PNMI_ERR048MSG "RlmtUpdate: Event function returns not 0" |
| 695 | #define SK_PNMI_ERR049 (SK_ERRBASE_PNMI + 49) |
| 696 | #define SK_PNMI_ERR049MSG "SkPnmiInit: Invalid size of 'CounterOffset' struct!!" |
| 697 | #define SK_PNMI_ERR050 (SK_ERRBASE_PNMI + 50) |
| 698 | #define SK_PNMI_ERR050MSG "SkPnmiInit: Invalid size of 'StatAddr' table!!" |
| 699 | #define SK_PNMI_ERR051 (SK_ERRBASE_PNMI + 51) |
| 700 | #define SK_PNMI_ERR051MSG "SkPnmiEvent: Port switch suspicious" |
| 701 | #define SK_PNMI_ERR052 (SK_ERRBASE_PNMI + 52) |
| 702 | #define SK_PNMI_ERR052MSG "" |
| 703 | |
| 704 | /* |
| 705 | * Management counter macros called by the driver |
| 706 | */ |
| 707 | #define SK_PNMI_SET_DRIVER_DESCR(pAC,v) ((pAC)->Pnmi.pDriverDescription = \ |
| 708 | (char *)(v)) |
| 709 | |
| 710 | #define SK_PNMI_SET_DRIVER_VER(pAC,v) ((pAC)->Pnmi.pDriverVersion = \ |
| 711 | (char *)(v)) |
| 712 | |
| 713 | |
| 714 | #define SK_PNMI_CNT_TX_QUEUE_LEN(pAC,v,p) \ |
| 715 | { \ |
| 716 | (pAC)->Pnmi.Port[p].TxSwQueueLen = (SK_U64)(v); \ |
| 717 | if ((pAC)->Pnmi.Port[p].TxSwQueueLen > (pAC)->Pnmi.Port[p].TxSwQueueMax) { \ |
| 718 | (pAC)->Pnmi.Port[p].TxSwQueueMax = (pAC)->Pnmi.Port[p].TxSwQueueLen; \ |
| 719 | } \ |
| 720 | } |
| 721 | #define SK_PNMI_CNT_TX_RETRY(pAC,p) (((pAC)->Pnmi.Port[p].TxRetryCts)++) |
| 722 | #define SK_PNMI_CNT_RX_INTR(pAC,p) (((pAC)->Pnmi.Port[p].RxIntrCts)++) |
| 723 | #define SK_PNMI_CNT_TX_INTR(pAC,p) (((pAC)->Pnmi.Port[p].TxIntrCts)++) |
| 724 | #define SK_PNMI_CNT_NO_RX_BUF(pAC,p) (((pAC)->Pnmi.Port[p].RxNoBufCts)++) |
| 725 | #define SK_PNMI_CNT_NO_TX_BUF(pAC,p) (((pAC)->Pnmi.Port[p].TxNoBufCts)++) |
| 726 | #define SK_PNMI_CNT_USED_TX_DESCR(pAC,v,p) \ |
| 727 | ((pAC)->Pnmi.Port[p].TxUsedDescrNo=(SK_U64)(v)); |
| 728 | #define SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,v,p) \ |
| 729 | { \ |
| 730 | ((pAC)->Pnmi.Port[p].RxDeliveredCts)++; \ |
| 731 | (pAC)->Pnmi.Port[p].RxOctetsDeliveredCts += (SK_U64)(v); \ |
| 732 | } |
| 733 | #define SK_PNMI_CNT_ERR_RECOVERY(pAC,p) (((pAC)->Pnmi.Port[p].ErrRecoveryCts)++); |
| 734 | |
| 735 | #define SK_PNMI_CNT_SYNC_OCTETS(pAC,p,v) \ |
| 736 | { \ |
| 737 | if ((p) < SK_MAX_MACS) { \ |
| 738 | ((pAC)->Pnmi.Port[p].StatSyncCts)++; \ |
| 739 | (pAC)->Pnmi.Port[p].StatSyncOctetsCts += (SK_U64)(v); \ |
| 740 | } \ |
| 741 | } |
| 742 | |
| 743 | #define SK_PNMI_CNT_RX_LONGFRAMES(pAC,p) \ |
| 744 | { \ |
| 745 | if ((p) < SK_MAX_MACS) { \ |
| 746 | ((pAC)->Pnmi.Port[p].StatRxLongFrameCts++); \ |
| 747 | } \ |
| 748 | } |
| 749 | |
| 750 | #define SK_PNMI_CNT_RX_FRAMETOOLONG(pAC,p) \ |
| 751 | { \ |
| 752 | if ((p) < SK_MAX_MACS) { \ |
| 753 | ((pAC)->Pnmi.Port[p].StatRxFrameTooLongCts++); \ |
| 754 | } \ |
| 755 | } |
| 756 | |
| 757 | #define SK_PNMI_CNT_RX_PMACC_ERR(pAC,p) \ |
| 758 | { \ |
| 759 | if ((p) < SK_MAX_MACS) { \ |
| 760 | ((pAC)->Pnmi.Port[p].StatRxPMaccErr++); \ |
| 761 | } \ |
| 762 | } |
| 763 | |
| 764 | /* |
| 765 | * Conversion Macros |
| 766 | */ |
| 767 | #define SK_PNMI_PORT_INST2LOG(i) ((unsigned int)(i) - 1) |
| 768 | #define SK_PNMI_PORT_LOG2INST(l) ((unsigned int)(l) + 1) |
| 769 | #define SK_PNMI_PORT_PHYS2LOG(p) ((unsigned int)(p) + 1) |
| 770 | #define SK_PNMI_PORT_LOG2PHYS(pAC,l) ((unsigned int)(l) - 1) |
| 771 | #define SK_PNMI_PORT_PHYS2INST(pAC,p) \ |
| 772 | (pAC->Pnmi.DualNetActiveFlag ? 2 : ((unsigned int)(p) + 2)) |
| 773 | #define SK_PNMI_PORT_INST2PHYS(pAC,i) ((unsigned int)(i) - 2) |
| 774 | |
| 775 | /* |
| 776 | * Structure definition for SkPnmiGetStruct and SkPnmiSetStruct |
| 777 | */ |
| 778 | #define SK_PNMI_VPD_KEY_SIZE 5 |
| 779 | #define SK_PNMI_VPD_BUFSIZE (VPD_SIZE) |
| 780 | #define SK_PNMI_VPD_ENTRIES (VPD_SIZE / 4) |
| 781 | #define SK_PNMI_VPD_DATALEN 128 /* Number of data bytes */ |
| 782 | |
| 783 | #define SK_PNMI_MULTICAST_LISTLEN 64 |
| 784 | #define SK_PNMI_SENSOR_ENTRIES (SK_MAX_SENSORS) |
| 785 | #define SK_PNMI_CHECKSUM_ENTRIES 3 |
| 786 | #define SK_PNMI_MAC_ENTRIES (SK_MAX_MACS + 1) |
| 787 | #define SK_PNMI_MONITOR_ENTRIES 20 |
| 788 | #define SK_PNMI_TRAP_ENTRIES 10 |
| 789 | #define SK_PNMI_TRAPLEN 128 |
| 790 | #define SK_PNMI_STRINGLEN1 80 |
| 791 | #define SK_PNMI_STRINGLEN2 25 |
| 792 | #define SK_PNMI_TRAP_QUEUE_LEN 512 |
| 793 | |
| 794 | typedef struct s_PnmiVpd { |
| 795 | char VpdKey[SK_PNMI_VPD_KEY_SIZE]; |
| 796 | char VpdValue[SK_PNMI_VPD_DATALEN]; |
| 797 | SK_U8 VpdAccess; |
| 798 | SK_U8 VpdAction; |
| 799 | } SK_PNMI_VPD; |
| 800 | |
| 801 | typedef struct s_PnmiSensor { |
| 802 | SK_U8 SensorIndex; |
| 803 | char SensorDescr[SK_PNMI_STRINGLEN2]; |
| 804 | SK_U8 SensorType; |
| 805 | SK_U32 SensorValue; |
| 806 | SK_U32 SensorWarningThresholdLow; |
| 807 | SK_U32 SensorWarningThresholdHigh; |
| 808 | SK_U32 SensorErrorThresholdLow; |
| 809 | SK_U32 SensorErrorThresholdHigh; |
| 810 | SK_U8 SensorStatus; |
| 811 | SK_U64 SensorWarningCts; |
| 812 | SK_U64 SensorErrorCts; |
| 813 | SK_U64 SensorWarningTimestamp; |
| 814 | SK_U64 SensorErrorTimestamp; |
| 815 | } SK_PNMI_SENSOR; |
| 816 | |
| 817 | typedef struct s_PnmiChecksum { |
| 818 | SK_U64 ChecksumRxOkCts; |
| 819 | SK_U64 ChecksumRxUnableCts; |
| 820 | SK_U64 ChecksumRxErrCts; |
| 821 | SK_U64 ChecksumTxOkCts; |
| 822 | SK_U64 ChecksumTxUnableCts; |
| 823 | } SK_PNMI_CHECKSUM; |
| 824 | |
| 825 | typedef struct s_PnmiStat { |
| 826 | SK_U64 StatTxOkCts; |
| 827 | SK_U64 StatTxOctetsOkCts; |
| 828 | SK_U64 StatTxBroadcastOkCts; |
| 829 | SK_U64 StatTxMulticastOkCts; |
| 830 | SK_U64 StatTxUnicastOkCts; |
| 831 | SK_U64 StatTxLongFramesCts; |
| 832 | SK_U64 StatTxBurstCts; |
| 833 | SK_U64 StatTxPauseMacCtrlCts; |
| 834 | SK_U64 StatTxMacCtrlCts; |
| 835 | SK_U64 StatTxSingleCollisionCts; |
| 836 | SK_U64 StatTxMultipleCollisionCts; |
| 837 | SK_U64 StatTxExcessiveCollisionCts; |
| 838 | SK_U64 StatTxLateCollisionCts; |
| 839 | SK_U64 StatTxDeferralCts; |
| 840 | SK_U64 StatTxExcessiveDeferralCts; |
| 841 | SK_U64 StatTxFifoUnderrunCts; |
| 842 | SK_U64 StatTxCarrierCts; |
| 843 | SK_U64 Dummy1; /* StatTxUtilization */ |
| 844 | SK_U64 StatTx64Cts; |
| 845 | SK_U64 StatTx127Cts; |
| 846 | SK_U64 StatTx255Cts; |
| 847 | SK_U64 StatTx511Cts; |
| 848 | SK_U64 StatTx1023Cts; |
| 849 | SK_U64 StatTxMaxCts; |
| 850 | SK_U64 StatTxSyncCts; |
| 851 | SK_U64 StatTxSyncOctetsCts; |
| 852 | SK_U64 StatRxOkCts; |
| 853 | SK_U64 StatRxOctetsOkCts; |
| 854 | SK_U64 StatRxBroadcastOkCts; |
| 855 | SK_U64 StatRxMulticastOkCts; |
| 856 | SK_U64 StatRxUnicastOkCts; |
| 857 | SK_U64 StatRxLongFramesCts; |
| 858 | SK_U64 StatRxPauseMacCtrlCts; |
| 859 | SK_U64 StatRxMacCtrlCts; |
| 860 | SK_U64 StatRxPauseMacCtrlErrorCts; |
| 861 | SK_U64 StatRxMacCtrlUnknownCts; |
| 862 | SK_U64 StatRxBurstCts; |
| 863 | SK_U64 StatRxMissedCts; |
| 864 | SK_U64 StatRxFramingCts; |
| 865 | SK_U64 StatRxFifoOverflowCts; |
| 866 | SK_U64 StatRxJabberCts; |
| 867 | SK_U64 StatRxCarrierCts; |
| 868 | SK_U64 StatRxIRLengthCts; |
| 869 | SK_U64 StatRxSymbolCts; |
| 870 | SK_U64 StatRxShortsCts; |
| 871 | SK_U64 StatRxRuntCts; |
| 872 | SK_U64 StatRxCextCts; |
| 873 | SK_U64 StatRxTooLongCts; |
| 874 | SK_U64 StatRxFcsCts; |
| 875 | SK_U64 Dummy2; /* StatRxUtilization */ |
| 876 | SK_U64 StatRx64Cts; |
| 877 | SK_U64 StatRx127Cts; |
| 878 | SK_U64 StatRx255Cts; |
| 879 | SK_U64 StatRx511Cts; |
| 880 | SK_U64 StatRx1023Cts; |
| 881 | SK_U64 StatRxMaxCts; |
| 882 | } SK_PNMI_STAT; |
| 883 | |
| 884 | typedef struct s_PnmiConf { |
| 885 | char ConfMacCurrentAddr[6]; |
| 886 | char ConfMacFactoryAddr[6]; |
| 887 | SK_U8 ConfPMD; |
| 888 | SK_U8 ConfConnector; |
| 889 | SK_U8 ConfLinkCapability; |
| 890 | SK_U8 ConfLinkMode; |
| 891 | SK_U8 ConfLinkModeStatus; |
| 892 | SK_U8 ConfLinkStatus; |
| 893 | SK_U8 ConfFlowCtrlCapability; |
| 894 | SK_U8 ConfFlowCtrlMode; |
| 895 | SK_U8 ConfFlowCtrlStatus; |
| 896 | SK_U8 ConfPhyOperationCapability; |
| 897 | SK_U8 ConfPhyOperationMode; |
| 898 | SK_U8 ConfPhyOperationStatus; |
| 899 | SK_U8 ConfSpeedCapability; |
| 900 | SK_U8 ConfSpeedMode; |
| 901 | SK_U8 ConfSpeedStatus; |
| 902 | } SK_PNMI_CONF; |
| 903 | |
| 904 | typedef struct s_PnmiRlmt { |
| 905 | SK_U32 RlmtIndex; |
| 906 | SK_U32 RlmtStatus; |
| 907 | SK_U64 RlmtTxHelloCts; |
| 908 | SK_U64 RlmtRxHelloCts; |
| 909 | SK_U64 RlmtTxSpHelloReqCts; |
| 910 | SK_U64 RlmtRxSpHelloCts; |
| 911 | } SK_PNMI_RLMT; |
| 912 | |
| 913 | typedef struct s_PnmiRlmtMonitor { |
| 914 | SK_U32 RlmtMonitorIndex; |
| 915 | char RlmtMonitorAddr[6]; |
| 916 | SK_U64 RlmtMonitorErrorCts; |
| 917 | SK_U64 RlmtMonitorTimestamp; |
| 918 | SK_U8 RlmtMonitorAdmin; |
| 919 | } SK_PNMI_RLMT_MONITOR; |
| 920 | |
| 921 | typedef struct s_PnmiRequestStatus { |
| 922 | SK_U32 ErrorStatus; |
| 923 | SK_U32 ErrorOffset; |
| 924 | } SK_PNMI_REQUEST_STATUS; |
| 925 | |
| 926 | typedef struct s_PnmiStrucData { |
| 927 | SK_U32 MgmtDBVersion; |
| 928 | SK_PNMI_REQUEST_STATUS ReturnStatus; |
| 929 | SK_U32 VpdFreeBytes; |
| 930 | char VpdEntriesList[SK_PNMI_VPD_ENTRIES * SK_PNMI_VPD_KEY_SIZE]; |
| 931 | SK_U32 VpdEntriesNumber; |
| 932 | SK_PNMI_VPD Vpd[SK_PNMI_VPD_ENTRIES]; |
| 933 | SK_U32 PortNumber; |
| 934 | SK_U32 DeviceType; |
| 935 | char DriverDescr[SK_PNMI_STRINGLEN1]; |
| 936 | char DriverVersion[SK_PNMI_STRINGLEN2]; |
| 937 | char HwDescr[SK_PNMI_STRINGLEN1]; |
| 938 | char HwVersion[SK_PNMI_STRINGLEN2]; |
| 939 | SK_U16 Chipset; |
| 940 | SK_U32 MtuSize; |
| 941 | SK_U32 Action; |
| 942 | SK_U32 TestResult; |
| 943 | SK_U8 BusType; |
| 944 | SK_U8 BusSpeed; |
| 945 | SK_U8 BusWidth; |
| 946 | SK_U8 SensorNumber; |
| 947 | SK_PNMI_SENSOR Sensor[SK_PNMI_SENSOR_ENTRIES]; |
| 948 | SK_U8 ChecksumNumber; |
| 949 | SK_PNMI_CHECKSUM Checksum[SK_PNMI_CHECKSUM_ENTRIES]; |
| 950 | SK_PNMI_STAT Stat[SK_PNMI_MAC_ENTRIES]; |
| 951 | SK_PNMI_CONF Conf[SK_PNMI_MAC_ENTRIES]; |
| 952 | SK_U8 RlmtMode; |
| 953 | SK_U32 RlmtPortNumber; |
| 954 | SK_U8 RlmtPortActive; |
| 955 | SK_U8 RlmtPortPreferred; |
| 956 | SK_U64 RlmtChangeCts; |
| 957 | SK_U64 RlmtChangeTime; |
| 958 | SK_U64 RlmtChangeEstimate; |
| 959 | SK_U64 RlmtChangeThreshold; |
| 960 | SK_PNMI_RLMT Rlmt[SK_MAX_MACS]; |
| 961 | SK_U32 RlmtMonitorNumber; |
| 962 | SK_PNMI_RLMT_MONITOR RlmtMonitor[SK_PNMI_MONITOR_ENTRIES]; |
| 963 | SK_U32 TrapNumber; |
| 964 | SK_U8 Trap[SK_PNMI_TRAP_QUEUE_LEN]; |
| 965 | SK_U64 TxSwQueueLen; |
| 966 | SK_U64 TxSwQueueMax; |
| 967 | SK_U64 TxRetryCts; |
| 968 | SK_U64 RxIntrCts; |
| 969 | SK_U64 TxIntrCts; |
| 970 | SK_U64 RxNoBufCts; |
| 971 | SK_U64 TxNoBufCts; |
| 972 | SK_U64 TxUsedDescrNo; |
| 973 | SK_U64 RxDeliveredCts; |
| 974 | SK_U64 RxOctetsDeliveredCts; |
| 975 | SK_U64 RxHwErrorsCts; |
| 976 | SK_U64 TxHwErrorsCts; |
| 977 | SK_U64 InErrorsCts; |
| 978 | SK_U64 OutErrorsCts; |
| 979 | SK_U64 ErrRecoveryCts; |
| 980 | SK_U64 SysUpTime; |
| 981 | } SK_PNMI_STRUCT_DATA; |
| 982 | |
| 983 | #define SK_PNMI_STRUCT_SIZE (sizeof(SK_PNMI_STRUCT_DATA)) |
| 984 | #define SK_PNMI_MIN_STRUCT_SIZE ((unsigned int)(SK_UPTR)\ |
| 985 | &(((SK_PNMI_STRUCT_DATA *)0)->VpdFreeBytes)) |
| 986 | /* |
| 987 | * ReturnStatus field |
| 988 | * must be located |
| 989 | * before VpdFreeBytes |
| 990 | */ |
| 991 | |
| 992 | /* |
| 993 | * Various definitions |
| 994 | */ |
| 995 | #define SK_PNMI_MAX_PROTOS 3 |
| 996 | |
| 997 | #define SK_PNMI_CNT_NO 66 /* Must have the value of the enum |
| 998 | * SK_PNMI_MAX_IDX. Define SK_PNMI_CHECK |
| 999 | * for check while init phase 1 |
| 1000 | */ |
| 1001 | |
| 1002 | /* |
| 1003 | * Estimate data structure |
| 1004 | */ |
| 1005 | typedef struct s_PnmiEstimate { |
| 1006 | unsigned int EstValueIndex; |
| 1007 | SK_U64 EstValue[7]; |
| 1008 | SK_U64 Estimate; |
| 1009 | SK_TIMER EstTimer; |
| 1010 | } SK_PNMI_ESTIMATE; |
| 1011 | |
| 1012 | |
| 1013 | /* |
| 1014 | * VCT timer data structure |
| 1015 | */ |
| 1016 | typedef struct s_VctTimer { |
| 1017 | SK_TIMER VctTimer; |
| 1018 | } SK_PNMI_VCT_TIMER; |
| 1019 | |
| 1020 | |
| 1021 | /* |
| 1022 | * PNMI specific adapter context structure |
| 1023 | */ |
| 1024 | typedef struct s_PnmiPort { |
| 1025 | SK_U64 StatSyncCts; |
| 1026 | SK_U64 StatSyncOctetsCts; |
| 1027 | SK_U64 StatRxLongFrameCts; |
| 1028 | SK_U64 StatRxFrameTooLongCts; |
| 1029 | SK_U64 StatRxPMaccErr; |
| 1030 | SK_U64 TxSwQueueLen; |
| 1031 | SK_U64 TxSwQueueMax; |
| 1032 | SK_U64 TxRetryCts; |
| 1033 | SK_U64 RxIntrCts; |
| 1034 | SK_U64 TxIntrCts; |
| 1035 | SK_U64 RxNoBufCts; |
| 1036 | SK_U64 TxNoBufCts; |
| 1037 | SK_U64 TxUsedDescrNo; |
| 1038 | SK_U64 RxDeliveredCts; |
| 1039 | SK_U64 RxOctetsDeliveredCts; |
| 1040 | SK_U64 RxHwErrorsCts; |
| 1041 | SK_U64 TxHwErrorsCts; |
| 1042 | SK_U64 InErrorsCts; |
| 1043 | SK_U64 OutErrorsCts; |
| 1044 | SK_U64 ErrRecoveryCts; |
| 1045 | SK_U64 RxShortZeroMark; |
| 1046 | SK_U64 CounterOffset[SK_PNMI_CNT_NO]; |
| 1047 | SK_U32 CounterHigh[SK_PNMI_CNT_NO]; |
| 1048 | SK_BOOL ActiveFlag; |
| 1049 | SK_U8 Align[3]; |
| 1050 | } SK_PNMI_PORT; |
| 1051 | |
| 1052 | |
| 1053 | typedef struct s_PnmiData { |
| 1054 | SK_PNMI_PORT Port [SK_MAX_MACS]; |
| 1055 | SK_PNMI_PORT BufPort [SK_MAX_MACS]; /* 2002-09-13 pweber */ |
| 1056 | SK_U64 VirtualCounterOffset[SK_PNMI_CNT_NO]; |
| 1057 | SK_U32 TestResult; |
| 1058 | char HwVersion[10]; |
| 1059 | SK_U16 Align01; |
| 1060 | |
| 1061 | char *pDriverDescription; |
| 1062 | char *pDriverVersion; |
| 1063 | |
| 1064 | int MacUpdatedFlag; |
| 1065 | int RlmtUpdatedFlag; |
| 1066 | int SirqUpdatedFlag; |
| 1067 | |
| 1068 | SK_U64 RlmtChangeCts; |
| 1069 | SK_U64 RlmtChangeTime; |
| 1070 | SK_PNMI_ESTIMATE RlmtChangeEstimate; |
| 1071 | SK_U64 RlmtChangeThreshold; |
| 1072 | |
| 1073 | SK_U64 StartUpTime; |
| 1074 | SK_U32 DeviceType; |
| 1075 | char PciBusSpeed; |
| 1076 | char PciBusWidth; |
| 1077 | char Chipset; |
| 1078 | char PMD; |
| 1079 | char Connector; |
| 1080 | SK_BOOL DualNetActiveFlag; |
| 1081 | SK_U16 Align02; |
| 1082 | |
| 1083 | char TrapBuf[SK_PNMI_TRAP_QUEUE_LEN]; |
| 1084 | unsigned int TrapBufFree; |
| 1085 | unsigned int TrapQueueBeg; |
| 1086 | unsigned int TrapQueueEnd; |
| 1087 | unsigned int TrapBufPad; |
| 1088 | unsigned int TrapUnique; |
| 1089 | SK_U8 VctStatus[SK_MAX_MACS]; |
| 1090 | SK_PNMI_VCT VctBackup[SK_MAX_MACS]; |
| 1091 | SK_PNMI_VCT_TIMER VctTimeout[SK_MAX_MACS]; |
| 1092 | } SK_PNMI; |
| 1093 | |
| 1094 | |
| 1095 | /* |
| 1096 | * Function prototypes |
| 1097 | */ |
| 1098 | extern int SkPnmiInit(SK_AC *pAc, SK_IOC IoC, int level); |
| 1099 | extern int SkPnmiGetVar(SK_AC *pAc, SK_IOC IoC, SK_U32 Id, void* pBuf, |
| 1100 | unsigned int* pLen, SK_U32 Instance, SK_U32 NetIndex); |
| 1101 | extern int SkPnmiPreSetVar(SK_AC *pAc, SK_IOC IoC, SK_U32 Id, |
| 1102 | void* pBuf, unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex); |
| 1103 | extern int SkPnmiSetVar(SK_AC *pAc, SK_IOC IoC, SK_U32 Id, void* pBuf, |
| 1104 | unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex); |
| 1105 | extern int SkPnmiGetStruct(SK_AC *pAc, SK_IOC IoC, void* pBuf, |
| 1106 | unsigned int *pLen, SK_U32 NetIndex); |
| 1107 | extern int SkPnmiPreSetStruct(SK_AC *pAc, SK_IOC IoC, void* pBuf, |
| 1108 | unsigned int *pLen, SK_U32 NetIndex); |
| 1109 | extern int SkPnmiSetStruct(SK_AC *pAc, SK_IOC IoC, void* pBuf, |
| 1110 | unsigned int *pLen, SK_U32 NetIndex); |
| 1111 | extern int SkPnmiEvent(SK_AC *pAc, SK_IOC IoC, SK_U32 Event, |
| 1112 | SK_EVPARA Param); |
| 1113 | |
| 1114 | #endif |