aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_hsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2x_hsi.h')
-rw-r--r--drivers/net/bnx2x_hsi.h374
1 files changed, 362 insertions, 12 deletions
diff --git a/drivers/net/bnx2x_hsi.h b/drivers/net/bnx2x_hsi.h
index e515d68ea20f..d3e8198d7dba 100644
--- a/drivers/net/bnx2x_hsi.h
+++ b/drivers/net/bnx2x_hsi.h
@@ -878,6 +878,337 @@ struct shmem_region { /* SharedMem Offset (size) */
878}; /* 0x6dc */ 878}; /* 0x6dc */
879 879
880 880
881struct emac_stats {
882 u32 rx_stat_ifhcinoctets;
883 u32 rx_stat_ifhcinbadoctets;
884 u32 rx_stat_etherstatsfragments;
885 u32 rx_stat_ifhcinucastpkts;
886 u32 rx_stat_ifhcinmulticastpkts;
887 u32 rx_stat_ifhcinbroadcastpkts;
888 u32 rx_stat_dot3statsfcserrors;
889 u32 rx_stat_dot3statsalignmenterrors;
890 u32 rx_stat_dot3statscarriersenseerrors;
891 u32 rx_stat_xonpauseframesreceived;
892 u32 rx_stat_xoffpauseframesreceived;
893 u32 rx_stat_maccontrolframesreceived;
894 u32 rx_stat_xoffstateentered;
895 u32 rx_stat_dot3statsframestoolong;
896 u32 rx_stat_etherstatsjabbers;
897 u32 rx_stat_etherstatsundersizepkts;
898 u32 rx_stat_etherstatspkts64octets;
899 u32 rx_stat_etherstatspkts65octetsto127octets;
900 u32 rx_stat_etherstatspkts128octetsto255octets;
901 u32 rx_stat_etherstatspkts256octetsto511octets;
902 u32 rx_stat_etherstatspkts512octetsto1023octets;
903 u32 rx_stat_etherstatspkts1024octetsto1522octets;
904 u32 rx_stat_etherstatspktsover1522octets;
905
906 u32 rx_stat_falsecarriererrors;
907
908 u32 tx_stat_ifhcoutoctets;
909 u32 tx_stat_ifhcoutbadoctets;
910 u32 tx_stat_etherstatscollisions;
911 u32 tx_stat_outxonsent;
912 u32 tx_stat_outxoffsent;
913 u32 tx_stat_flowcontroldone;
914 u32 tx_stat_dot3statssinglecollisionframes;
915 u32 tx_stat_dot3statsmultiplecollisionframes;
916 u32 tx_stat_dot3statsdeferredtransmissions;
917 u32 tx_stat_dot3statsexcessivecollisions;
918 u32 tx_stat_dot3statslatecollisions;
919 u32 tx_stat_ifhcoutucastpkts;
920 u32 tx_stat_ifhcoutmulticastpkts;
921 u32 tx_stat_ifhcoutbroadcastpkts;
922 u32 tx_stat_etherstatspkts64octets;
923 u32 tx_stat_etherstatspkts65octetsto127octets;
924 u32 tx_stat_etherstatspkts128octetsto255octets;
925 u32 tx_stat_etherstatspkts256octetsto511octets;
926 u32 tx_stat_etherstatspkts512octetsto1023octets;
927 u32 tx_stat_etherstatspkts1024octetsto1522octets;
928 u32 tx_stat_etherstatspktsover1522octets;
929 u32 tx_stat_dot3statsinternalmactransmiterrors;
930};
931
932
933struct bmac_stats {
934 u32 tx_stat_gtpkt_lo;
935 u32 tx_stat_gtpkt_hi;
936 u32 tx_stat_gtxpf_lo;
937 u32 tx_stat_gtxpf_hi;
938 u32 tx_stat_gtfcs_lo;
939 u32 tx_stat_gtfcs_hi;
940 u32 tx_stat_gtmca_lo;
941 u32 tx_stat_gtmca_hi;
942 u32 tx_stat_gtbca_lo;
943 u32 tx_stat_gtbca_hi;
944 u32 tx_stat_gtfrg_lo;
945 u32 tx_stat_gtfrg_hi;
946 u32 tx_stat_gtovr_lo;
947 u32 tx_stat_gtovr_hi;
948 u32 tx_stat_gt64_lo;
949 u32 tx_stat_gt64_hi;
950 u32 tx_stat_gt127_lo;
951 u32 tx_stat_gt127_hi;
952 u32 tx_stat_gt255_lo;
953 u32 tx_stat_gt255_hi;
954 u32 tx_stat_gt511_lo;
955 u32 tx_stat_gt511_hi;
956 u32 tx_stat_gt1023_lo;
957 u32 tx_stat_gt1023_hi;
958 u32 tx_stat_gt1518_lo;
959 u32 tx_stat_gt1518_hi;
960 u32 tx_stat_gt2047_lo;
961 u32 tx_stat_gt2047_hi;
962 u32 tx_stat_gt4095_lo;
963 u32 tx_stat_gt4095_hi;
964 u32 tx_stat_gt9216_lo;
965 u32 tx_stat_gt9216_hi;
966 u32 tx_stat_gt16383_lo;
967 u32 tx_stat_gt16383_hi;
968 u32 tx_stat_gtmax_lo;
969 u32 tx_stat_gtmax_hi;
970 u32 tx_stat_gtufl_lo;
971 u32 tx_stat_gtufl_hi;
972 u32 tx_stat_gterr_lo;
973 u32 tx_stat_gterr_hi;
974 u32 tx_stat_gtbyt_lo;
975 u32 tx_stat_gtbyt_hi;
976
977 u32 rx_stat_gr64_lo;
978 u32 rx_stat_gr64_hi;
979 u32 rx_stat_gr127_lo;
980 u32 rx_stat_gr127_hi;
981 u32 rx_stat_gr255_lo;
982 u32 rx_stat_gr255_hi;
983 u32 rx_stat_gr511_lo;
984 u32 rx_stat_gr511_hi;
985 u32 rx_stat_gr1023_lo;
986 u32 rx_stat_gr1023_hi;
987 u32 rx_stat_gr1518_lo;
988 u32 rx_stat_gr1518_hi;
989 u32 rx_stat_gr2047_lo;
990 u32 rx_stat_gr2047_hi;
991 u32 rx_stat_gr4095_lo;
992 u32 rx_stat_gr4095_hi;
993 u32 rx_stat_gr9216_lo;
994 u32 rx_stat_gr9216_hi;
995 u32 rx_stat_gr16383_lo;
996 u32 rx_stat_gr16383_hi;
997 u32 rx_stat_grmax_lo;
998 u32 rx_stat_grmax_hi;
999 u32 rx_stat_grpkt_lo;
1000 u32 rx_stat_grpkt_hi;
1001 u32 rx_stat_grfcs_lo;
1002 u32 rx_stat_grfcs_hi;
1003 u32 rx_stat_grmca_lo;
1004 u32 rx_stat_grmca_hi;
1005 u32 rx_stat_grbca_lo;
1006 u32 rx_stat_grbca_hi;
1007 u32 rx_stat_grxcf_lo;
1008 u32 rx_stat_grxcf_hi;
1009 u32 rx_stat_grxpf_lo;
1010 u32 rx_stat_grxpf_hi;
1011 u32 rx_stat_grxuo_lo;
1012 u32 rx_stat_grxuo_hi;
1013 u32 rx_stat_grjbr_lo;
1014 u32 rx_stat_grjbr_hi;
1015 u32 rx_stat_grovr_lo;
1016 u32 rx_stat_grovr_hi;
1017 u32 rx_stat_grflr_lo;
1018 u32 rx_stat_grflr_hi;
1019 u32 rx_stat_grmeg_lo;
1020 u32 rx_stat_grmeg_hi;
1021 u32 rx_stat_grmeb_lo;
1022 u32 rx_stat_grmeb_hi;
1023 u32 rx_stat_grbyt_lo;
1024 u32 rx_stat_grbyt_hi;
1025 u32 rx_stat_grund_lo;
1026 u32 rx_stat_grund_hi;
1027 u32 rx_stat_grfrg_lo;
1028 u32 rx_stat_grfrg_hi;
1029 u32 rx_stat_grerb_lo;
1030 u32 rx_stat_grerb_hi;
1031 u32 rx_stat_grfre_lo;
1032 u32 rx_stat_grfre_hi;
1033 u32 rx_stat_gripj_lo;
1034 u32 rx_stat_gripj_hi;
1035};
1036
1037
1038union mac_stats {
1039 struct emac_stats emac_stats;
1040 struct bmac_stats bmac_stats;
1041};
1042
1043
1044struct mac_stx {
1045 /* in_bad_octets */
1046 u32 rx_stat_ifhcinbadoctets_hi;
1047 u32 rx_stat_ifhcinbadoctets_lo;
1048
1049 /* out_bad_octets */
1050 u32 tx_stat_ifhcoutbadoctets_hi;
1051 u32 tx_stat_ifhcoutbadoctets_lo;
1052
1053 /* crc_receive_errors */
1054 u32 rx_stat_dot3statsfcserrors_hi;
1055 u32 rx_stat_dot3statsfcserrors_lo;
1056 /* alignment_errors */
1057 u32 rx_stat_dot3statsalignmenterrors_hi;
1058 u32 rx_stat_dot3statsalignmenterrors_lo;
1059 /* carrier_sense_errors */
1060 u32 rx_stat_dot3statscarriersenseerrors_hi;
1061 u32 rx_stat_dot3statscarriersenseerrors_lo;
1062 /* false_carrier_detections */
1063 u32 rx_stat_falsecarriererrors_hi;
1064 u32 rx_stat_falsecarriererrors_lo;
1065
1066 /* runt_packets_received */
1067 u32 rx_stat_etherstatsundersizepkts_hi;
1068 u32 rx_stat_etherstatsundersizepkts_lo;
1069 /* jabber_packets_received */
1070 u32 rx_stat_dot3statsframestoolong_hi;
1071 u32 rx_stat_dot3statsframestoolong_lo;
1072
1073 /* error_runt_packets_received */
1074 u32 rx_stat_etherstatsfragments_hi;
1075 u32 rx_stat_etherstatsfragments_lo;
1076 /* error_jabber_packets_received */
1077 u32 rx_stat_etherstatsjabbers_hi;
1078 u32 rx_stat_etherstatsjabbers_lo;
1079
1080 /* control_frames_received */
1081 u32 rx_stat_maccontrolframesreceived_hi;
1082 u32 rx_stat_maccontrolframesreceived_lo;
1083 u32 rx_stat_bmac_xpf_hi;
1084 u32 rx_stat_bmac_xpf_lo;
1085 u32 rx_stat_bmac_xcf_hi;
1086 u32 rx_stat_bmac_xcf_lo;
1087
1088 /* xoff_state_entered */
1089 u32 rx_stat_xoffstateentered_hi;
1090 u32 rx_stat_xoffstateentered_lo;
1091 /* pause_xon_frames_received */
1092 u32 rx_stat_xonpauseframesreceived_hi;
1093 u32 rx_stat_xonpauseframesreceived_lo;
1094 /* pause_xoff_frames_received */
1095 u32 rx_stat_xoffpauseframesreceived_hi;
1096 u32 rx_stat_xoffpauseframesreceived_lo;
1097 /* pause_xon_frames_transmitted */
1098 u32 tx_stat_outxonsent_hi;
1099 u32 tx_stat_outxonsent_lo;
1100 /* pause_xoff_frames_transmitted */
1101 u32 tx_stat_outxoffsent_hi;
1102 u32 tx_stat_outxoffsent_lo;
1103 /* flow_control_done */
1104 u32 tx_stat_flowcontroldone_hi;
1105 u32 tx_stat_flowcontroldone_lo;
1106
1107 /* ether_stats_collisions */
1108 u32 tx_stat_etherstatscollisions_hi;
1109 u32 tx_stat_etherstatscollisions_lo;
1110 /* single_collision_transmit_frames */
1111 u32 tx_stat_dot3statssinglecollisionframes_hi;
1112 u32 tx_stat_dot3statssinglecollisionframes_lo;
1113 /* multiple_collision_transmit_frames */
1114 u32 tx_stat_dot3statsmultiplecollisionframes_hi;
1115 u32 tx_stat_dot3statsmultiplecollisionframes_lo;
1116 /* deferred_transmissions */
1117 u32 tx_stat_dot3statsdeferredtransmissions_hi;
1118 u32 tx_stat_dot3statsdeferredtransmissions_lo;
1119 /* excessive_collision_frames */
1120 u32 tx_stat_dot3statsexcessivecollisions_hi;
1121 u32 tx_stat_dot3statsexcessivecollisions_lo;
1122 /* late_collision_frames */
1123 u32 tx_stat_dot3statslatecollisions_hi;
1124 u32 tx_stat_dot3statslatecollisions_lo;
1125
1126 /* frames_transmitted_64_bytes */
1127 u32 tx_stat_etherstatspkts64octets_hi;
1128 u32 tx_stat_etherstatspkts64octets_lo;
1129 /* frames_transmitted_65_127_bytes */
1130 u32 tx_stat_etherstatspkts65octetsto127octets_hi;
1131 u32 tx_stat_etherstatspkts65octetsto127octets_lo;
1132 /* frames_transmitted_128_255_bytes */
1133 u32 tx_stat_etherstatspkts128octetsto255octets_hi;
1134 u32 tx_stat_etherstatspkts128octetsto255octets_lo;
1135 /* frames_transmitted_256_511_bytes */
1136 u32 tx_stat_etherstatspkts256octetsto511octets_hi;
1137 u32 tx_stat_etherstatspkts256octetsto511octets_lo;
1138 /* frames_transmitted_512_1023_bytes */
1139 u32 tx_stat_etherstatspkts512octetsto1023octets_hi;
1140 u32 tx_stat_etherstatspkts512octetsto1023octets_lo;
1141 /* frames_transmitted_1024_1522_bytes */
1142 u32 tx_stat_etherstatspkts1024octetsto1522octets_hi;
1143 u32 tx_stat_etherstatspkts1024octetsto1522octets_lo;
1144 /* frames_transmitted_1523_9022_bytes */
1145 u32 tx_stat_etherstatspktsover1522octets_hi;
1146 u32 tx_stat_etherstatspktsover1522octets_lo;
1147 u32 tx_stat_bmac_2047_hi;
1148 u32 tx_stat_bmac_2047_lo;
1149 u32 tx_stat_bmac_4095_hi;
1150 u32 tx_stat_bmac_4095_lo;
1151 u32 tx_stat_bmac_9216_hi;
1152 u32 tx_stat_bmac_9216_lo;
1153 u32 tx_stat_bmac_16383_hi;
1154 u32 tx_stat_bmac_16383_lo;
1155
1156 /* internal_mac_transmit_errors */
1157 u32 tx_stat_dot3statsinternalmactransmiterrors_hi;
1158 u32 tx_stat_dot3statsinternalmactransmiterrors_lo;
1159
1160 /* if_out_discards */
1161 u32 tx_stat_bmac_ufl_hi;
1162 u32 tx_stat_bmac_ufl_lo;
1163};
1164
1165
1166#define MAC_STX_IDX_MAX 2
1167
1168struct host_port_stats {
1169 u32 host_port_stats_start;
1170
1171 struct mac_stx mac_stx[MAC_STX_IDX_MAX];
1172
1173 u32 brb_drop_hi;
1174 u32 brb_drop_lo;
1175
1176 u32 host_port_stats_end;
1177};
1178
1179
1180struct host_func_stats {
1181 u32 host_func_stats_start;
1182
1183 u32 total_bytes_received_hi;
1184 u32 total_bytes_received_lo;
1185
1186 u32 total_bytes_transmitted_hi;
1187 u32 total_bytes_transmitted_lo;
1188
1189 u32 total_unicast_packets_received_hi;
1190 u32 total_unicast_packets_received_lo;
1191
1192 u32 total_multicast_packets_received_hi;
1193 u32 total_multicast_packets_received_lo;
1194
1195 u32 total_broadcast_packets_received_hi;
1196 u32 total_broadcast_packets_received_lo;
1197
1198 u32 total_unicast_packets_transmitted_hi;
1199 u32 total_unicast_packets_transmitted_lo;
1200
1201 u32 total_multicast_packets_transmitted_hi;
1202 u32 total_multicast_packets_transmitted_lo;
1203
1204 u32 total_broadcast_packets_transmitted_hi;
1205 u32 total_broadcast_packets_transmitted_lo;
1206
1207 u32 valid_bytes_received_hi;
1208 u32 valid_bytes_received_lo;
1209
1210 u32 host_func_stats_end;
1211};
881 1212
882 1213
883#define BCM_5710_FW_MAJOR_VERSION 4 1214#define BCM_5710_FW_MAJOR_VERSION 4
@@ -2367,9 +2698,9 @@ struct cmng_struct_per_port {
2367 2698
2368 2699
2369/* 2700/*
2370 * Common statistics collected by the Xstorm (per port) 2701 * Protocol-common statistics collected by the Xstorm (per client)
2371 */ 2702 */
2372struct xstorm_common_stats { 2703struct xstorm_per_client_stats {
2373 struct regpair total_sent_bytes; 2704 struct regpair total_sent_bytes;
2374 u32 total_sent_pkts; 2705 u32 total_sent_pkts;
2375 u32 unicast_pkts_sent; 2706 u32 unicast_pkts_sent;
@@ -2378,9 +2709,31 @@ struct xstorm_common_stats {
2378 u32 multicast_pkts_sent; 2709 u32 multicast_pkts_sent;
2379 u32 broadcast_pkts_sent; 2710 u32 broadcast_pkts_sent;
2380 struct regpair broadcast_bytes_sent; 2711 struct regpair broadcast_bytes_sent;
2381 struct regpair done; 2712 u16 stats_counter;
2713 u16 reserved0;
2714 u32 reserved1;
2382}; 2715};
2383 2716
2717
2718/*
2719 * Common statistics collected by the Xstorm (per port)
2720 */
2721struct xstorm_common_stats {
2722 struct xstorm_per_client_stats client_statistics[MAX_X_STAT_COUNTER_ID];
2723};
2724
2725
2726/*
2727 * Protocol-common statistics collected by the Tstorm (per port)
2728 */
2729struct tstorm_per_port_stats {
2730 u32 mac_filter_discard;
2731 u32 xxoverflow_discard;
2732 u32 brb_truncate_discard;
2733 u32 mac_discard;
2734};
2735
2736
2384/* 2737/*
2385 * Protocol-common statistics collected by the Tstorm (per client) 2738 * Protocol-common statistics collected by the Tstorm (per client)
2386 */ 2739 */
@@ -2398,20 +2751,17 @@ struct tstorm_per_client_stats {
2398 u32 rcv_multicast_pkts; 2751 u32 rcv_multicast_pkts;
2399 u32 no_buff_discard; 2752 u32 no_buff_discard;
2400 u32 ttl0_discard; 2753 u32 ttl0_discard;
2401 u32 mac_discard; 2754 u16 stats_counter;
2402 u32 reserved; 2755 u16 reserved0;
2756 u32 reserved1;
2403}; 2757};
2404 2758
2405/* 2759/*
2406 * Protocol-common statistics collected by the Tstorm (per port) 2760 * Protocol-common statistics collected by the Tstorm
2407 */ 2761 */
2408struct tstorm_common_stats { 2762struct tstorm_common_stats {
2409 struct tstorm_per_client_stats client_statistics[MAX_T_STAT_COUNTER_ID]; 2763 struct tstorm_per_port_stats port_statistics;
2410 u32 mac_filter_discard; 2764 struct tstorm_per_client_stats client_statistics[MAX_T_STAT_COUNTER_ID];
2411 u32 xxoverflow_discard;
2412 u32 brb_truncate_discard;
2413 u32 reserved;
2414 struct regpair done;
2415}; 2765};
2416 2766
2417/* 2767/*