xref: /linux/drivers/net/ethernet/fungible/funeth/fun_port.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1*21c5ea95SDimitris Michailidis /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
2*21c5ea95SDimitris Michailidis 
3*21c5ea95SDimitris Michailidis #ifndef _FUN_PORT_H
4*21c5ea95SDimitris Michailidis #define _FUN_PORT_H
5*21c5ea95SDimitris Michailidis 
6*21c5ea95SDimitris Michailidis enum port_mac_rx_stats {
7*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsOctets = 0x0,
8*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_OctetsReceivedOK = 0x1,
9*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_aAlignmentErrors = 0x2,
10*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_aPAUSEMACCtrlFramesReceived = 0x3,
11*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_aFrameTooLongErrors = 0x4,
12*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_aInRangeLengthErrors = 0x5,
13*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_aFramesReceivedOK = 0x6,
14*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_aFrameCheckSequenceErrors = 0x7,
15*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_VLANReceivedOK = 0x8,
16*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_ifInErrors = 0x9,
17*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_ifInUcastPkts = 0xa,
18*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_ifInMulticastPkts = 0xb,
19*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_ifInBroadcastPkts = 0xc,
20*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsDropEvents = 0xd,
21*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsPkts = 0xe,
22*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsUndersizePkts = 0xf,
23*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsPkts64Octets = 0x10,
24*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsPkts65to127Octets = 0x11,
25*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsPkts128to255Octets = 0x12,
26*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsPkts256to511Octets = 0x13,
27*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsPkts512to1023Octets = 0x14,
28*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsPkts1024to1518Octets = 0x15,
29*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsPkts1519toMaxOctets = 0x16,
30*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsOversizePkts = 0x17,
31*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsJabbers = 0x18,
32*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_etherStatsFragments = 0x19,
33*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_0 = 0x1a,
34*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_1 = 0x1b,
35*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_2 = 0x1c,
36*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_3 = 0x1d,
37*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_4 = 0x1e,
38*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_5 = 0x1f,
39*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_6 = 0x20,
40*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_7 = 0x21,
41*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_8 = 0x22,
42*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_9 = 0x23,
43*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_10 = 0x24,
44*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_11 = 0x25,
45*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_12 = 0x26,
46*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_13 = 0x27,
47*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_14 = 0x28,
48*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_CBFCPAUSEFramesReceived_15 = 0x29,
49*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_MACControlFramesReceived = 0x2a,
50*21c5ea95SDimitris Michailidis 	PORT_MAC_RX_STATS_MAX = 0x2b,
51*21c5ea95SDimitris Michailidis };
52*21c5ea95SDimitris Michailidis 
53*21c5ea95SDimitris Michailidis enum port_mac_tx_stats {
54*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_etherStatsOctets = 0x0,
55*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_OctetsTransmittedOK = 0x1,
56*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_aPAUSEMACCtrlFramesTransmitted = 0x2,
57*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_aFramesTransmittedOK = 0x3,
58*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_VLANTransmittedOK = 0x4,
59*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_ifOutErrors = 0x5,
60*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_ifOutUcastPkts = 0x6,
61*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_ifOutMulticastPkts = 0x7,
62*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_ifOutBroadcastPkts = 0x8,
63*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_etherStatsPkts64Octets = 0x9,
64*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_etherStatsPkts65to127Octets = 0xa,
65*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_etherStatsPkts128to255Octets = 0xb,
66*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_etherStatsPkts256to511Octets = 0xc,
67*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_etherStatsPkts512to1023Octets = 0xd,
68*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_etherStatsPkts1024to1518Octets = 0xe,
69*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_etherStatsPkts1519toMaxOctets = 0xf,
70*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_0 = 0x10,
71*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_1 = 0x11,
72*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_2 = 0x12,
73*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_3 = 0x13,
74*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_4 = 0x14,
75*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_5 = 0x15,
76*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_6 = 0x16,
77*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_7 = 0x17,
78*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_8 = 0x18,
79*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_9 = 0x19,
80*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_10 = 0x1a,
81*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_11 = 0x1b,
82*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_12 = 0x1c,
83*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_13 = 0x1d,
84*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_14 = 0x1e,
85*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_CBFCPAUSEFramesTransmitted_15 = 0x1f,
86*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_MACControlFramesTransmitted = 0x20,
87*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_etherStatsPkts = 0x21,
88*21c5ea95SDimitris Michailidis 	PORT_MAC_TX_STATS_MAX = 0x22,
89*21c5ea95SDimitris Michailidis };
90*21c5ea95SDimitris Michailidis 
91*21c5ea95SDimitris Michailidis enum port_mac_fec_stats {
92*21c5ea95SDimitris Michailidis 	PORT_MAC_FEC_Correctable = 0x0,
93*21c5ea95SDimitris Michailidis 	PORT_MAC_FEC_Uncorrectable = 0x1,
94*21c5ea95SDimitris Michailidis 	PORT_MAC_FEC_STATS_MAX = 0x2,
95*21c5ea95SDimitris Michailidis };
96*21c5ea95SDimitris Michailidis 
97*21c5ea95SDimitris Michailidis #endif /* _FUN_PORT_H */
98