1 /* 2 * This program is distributed in the hope that it will be useful, 3 * but WITHOUT ANY WARRANTY; without even the implied warranty of 4 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 5 * GNU General Public License for more details. 6 * 7 * You should have received a copy of the GNU General Public License 8 * along with this program; if not, write to the Free Software 9 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 10 */ 11 12 #ifndef NCSI_H 13 #define NCSI_H 14 15 16 #define NCSI_RxDMA_PakSize 2048 17 #define NCSI_RxDMA_BASE ( DMA_BASE + 0x00100000 ) 18 19 //--------------------------------------------------------- 20 // Define 21 //--------------------------------------------------------- 22 #define MAX_PACKAGE_NUM 8 // 1 ~ 8 23 #define MAX_CHANNEL_NUM 4 // 1 ~ 32 24 25 //--------------------------------------------------------- 26 // Function 27 //--------------------------------------------------------- 28 #define SENT_RETRY_COUNT 1 29 #define NCSI_RxDESNum 2048 30 31 #define NCSI_Skip_RxCRCData 32 //#define NCSI_Skip_Phase1_DeSelectPackage 33 //#define NCSI_Skip_DeSelectPackage 34 //#define NCSI_Skip_DiSChannel 35 //#define NCSI_EnableDelay_DeSelectPackage 36 //#define NCSI_EnableDelay_GetLinkStatus 37 //#define NCSI_EnableDelay_EachPackage 38 //#define Print_Version_ID 39 //#define Print_PackageName 40 #define Print_DetailFrame 41 42 //--------------------------------------------------------- 43 // Delay (ms) 44 //--------------------------------------------------------- 45 #define Delay_EachPackage 1000 46 #define Delay_DeSelectPackage 50 47 #define Delay_GetLinkStatus 50 48 49 //--------------------------------------------------------- 50 // PCI DID/VID & Manufacturer ID 51 //--------------------------------------------------------- 52 #define ManufacturerID_Intel 0x00000157 //343 53 #define ManufacturerID_Broadcom 0x0000113d //4413 54 #define ManufacturerID_Mellanox 0x000002c9 //713 55 #define ManufacturerID_Mellanox1 0x00008119 //33049 56 #define ManufacturerID_Emulex 0x0000006c //108 57 58 //PCI VID: [163c]intel 59 //PCI VID: [8086]Intel Corporation 60 //PCI VID: [8087]Intel 61 //PCI VID: [14e4]Broadcom Corporation 62 //PCI VID: [15b3]Mellanox 63 //PCI VID: [10df]Emulex 64 #define PCI_DID_VID_Intel_82574L 0x10d38086 // IntelR 82574L Gigabit Ethernet Controller 65 #define PCI_DID_VID_Intel_82575_10d6 0x10d68086 // 82566 DM-2-gigabyte 66 #define PCI_DID_VID_Intel_82575_10a7 0x10a78086 // 82575EB Gigabit Network Connection 67 #define PCI_DID_VID_Intel_82575_10a9 0x10a98086 // 82575EB Gigabit Network Connection 68 #define PCI_DID_VID_Intel_82576_10c9 0x10c98086 //*82576 Gigabit ET Dual Port Server Adapter 69 #define PCI_DID_VID_Intel_82576_10e6 0x10e68086 // 82576 Gigabit Network Connection 70 #define PCI_DID_VID_Intel_82576_10e7 0x10e78086 // 82576 Gigabit Network Connection 71 #define PCI_DID_VID_Intel_82576_10e8 0x10e88086 // E64750-xxx Intel Gigabit ET Quad Port Server Adapter 72 #define PCI_DID_VID_Intel_82576_1518 0x15188086 // 82576NS SerDes Gigabit Network Connectio 73 #define PCI_DID_VID_Intel_82576_1526 0x15268086 // Intel Gigabit ET2 Quad Port Server Adapter 74 #define PCI_DID_VID_Intel_82576_150a 0x150a8086 // 82576NS Gigabit Ethernet Controller 75 #define PCI_DID_VID_Intel_82576_150d 0x150d8086 // 82576 Gigabit Backplane Connection 76 #define PCI_DID_VID_Intel_82599_10fb 0x10fb8086 // 10 Gb Ethernet controller 77 #define PCI_DID_VID_Intel_82599_1557 0x15578086 // 82599EN 78 #define PCI_DID_VID_Intel_I210_1533 0x15338086 // 79 #define PCI_DID_VID_Intel_I210_1537 0x15378086 //??? 80 #define PCI_DID_VID_Intel_I350_1521 0x15218086 // 81 #define PCI_DID_VID_Intel_I350_1523 0x15238086 // 82 #define PCI_DID_VID_Intel_X540 0x15288086 // 83 #define PCI_DID_VID_Intel_X550 0x15638086 // 84 #define PCI_DID_VID_Intel_Broadwell_DE 0x15ab8086 //PCH 85 #define PCI_DID_VID_Intel_X722_37d0 0x37d08086 // 86 #define PCI_DID_VID_Broadcom_BCM5718 0x165614e4 // 87 #define PCI_DID_VID_Broadcom_BCM5719 0x165714e4 // 88 #define PCI_DID_VID_Broadcom_BCM5720 0x165f14e4 // 89 #define PCI_DID_VID_Broadcom_BCM5725 0x164314e4 // 90 #define PCI_DID_VID_Broadcom_BCM57810S 0x168e14e4 // 91 #define PCI_DID_VID_Broadcom_Cumulus 0x16ca14e4 // 92 #define PCI_DID_VID_Broadcom_BCM57302 0x16c914e4 // 93 #define PCI_DID_VID_Broadcom_BCM957452 0x16f114e4 // 94 #define PCI_DID_VID_Mellanox_ConnectX_3_1003 0x100315b3 //* 95 #define PCI_DID_VID_Mellanox_ConnectX_3_1007 0x100715b3 //ConnectX-3 Pro 96 #define PCI_DID_VID_Mellanox_ConnectX_4 0x101515b3 //* 97 #define PCI_DID_VID_Emulex_40G 0x072010df // 98 99 //--------------------------------------------------------- 100 // NCSI Parameter 101 //--------------------------------------------------------- 102 //Command and Response Type 103 #define CLEAR_INITIAL_STATE 0x00 //M 104 #define SELECT_PACKAGE 0x01 //M 105 #define DESELECT_PACKAGE 0x02 //M 106 #define ENABLE_CHANNEL 0x03 //M 107 #define DISABLE_CHANNEL 0x04 //M 108 #define RESET_CHANNEL 0x05 //M 109 #define ENABLE_CHANNEL_NETWORK_TX 0x06 //M 110 #define DISABLE_CHANNEL_NETWORK_TX 0x07 //M 111 #define AEN_ENABLE 0x08 112 #define SET_LINK 0x09 //M 113 #define GET_LINK_STATUS 0x0A //M 114 #define SET_VLAN_FILTER 0x0B //M 115 #define ENABLE_VLAN 0x0C //M 116 #define DISABLE_VLAN 0x0D //M 117 #define SET_MAC_ADDRESS 0x0E //M 118 #define ENABLE_BROADCAST_FILTERING 0x10 //M 119 #define DISABLE_BROADCAST_FILTERING 0x11 //M 120 #define ENABLE_GLOBAL_MULTICAST_FILTERING 0x12 121 #define DISABLE_GLOBAL_MULTICAST_FILTERING 0x13 122 #define SET_NCSI_FLOW_CONTROL 0x14 123 #define GET_VERSION_ID 0x15 //M 124 #define GET_CAPABILITIES 0x16 //M 125 #define GET_PARAMETERS 0x17 //M 126 #define GET_CONTROLLER_PACKET_STATISTICS 0x18 127 #define GET_NCSI_STATISTICS 0x19 128 #define GET_NCSI_PASS_THROUGH_STATISTICS 0x1A 129 130 //Standard Response Code 131 #define COMMAND_COMPLETED 0x00 132 #define COMMAND_FAILED 0x01 133 #define COMMAND_UNAVAILABLE 0x02 134 #define COMMAND_UNSUPPORTED 0x03 135 136 //Standard Reason Code 137 #define NO_ERROR 0x0000 138 #define INTERFACE_INITIALIZATION_REQUIRED 0x0001 139 #define PARAMETER_IS_INVALID 0x0002 140 #define CHANNEL_NOT_READY 0x0003 141 #define PACKAGE_NOT_READY 0x0004 142 #define INVALID_PAYLOAD_LENGTH 0x0005 143 #define UNKNOWN_COMMAND_TYPE 0x7FFF 144 145 //SET_MAC_ADDRESS 146 #define UNICAST ( 0x00 << 5 ) 147 #define MULTICAST ( 0x01 << 5 ) 148 #define DISABLE_MAC_ADDRESS_FILTER 0x00 149 #define ENABLE_MAC_ADDRESS_FILTER 0x01 150 151 //GET_LINK_STATUS 152 #define LINK_DOWN 0 153 #define LINK_UP 1 154 155 #endif // NCSI_H 156