lan743x: Add support for ethtool statistics
Implement ethtool statistics Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
63b92a91a4
commit
8114e8a2f1
@@ -291,6 +291,7 @@
|
||||
/* MAC statistics registers */
|
||||
#define STAT_RX_FCS_ERRORS (0x1200)
|
||||
#define STAT_RX_ALIGNMENT_ERRORS (0x1204)
|
||||
#define STAT_RX_FRAGMENT_ERRORS (0x1208)
|
||||
#define STAT_RX_JABBER_ERRORS (0x120C)
|
||||
#define STAT_RX_UNDERSIZE_FRAME_ERRORS (0x1210)
|
||||
#define STAT_RX_OVERSIZE_FRAME_ERRORS (0x1214)
|
||||
@@ -298,12 +299,26 @@
|
||||
#define STAT_RX_UNICAST_BYTE_COUNT (0x121C)
|
||||
#define STAT_RX_BROADCAST_BYTE_COUNT (0x1220)
|
||||
#define STAT_RX_MULTICAST_BYTE_COUNT (0x1224)
|
||||
#define STAT_RX_UNICAST_FRAMES (0x1228)
|
||||
#define STAT_RX_BROADCAST_FRAMES (0x122C)
|
||||
#define STAT_RX_MULTICAST_FRAMES (0x1230)
|
||||
#define STAT_RX_PAUSE_FRAMES (0x1234)
|
||||
#define STAT_RX_64_BYTE_FRAMES (0x1238)
|
||||
#define STAT_RX_65_127_BYTE_FRAMES (0x123C)
|
||||
#define STAT_RX_128_255_BYTE_FRAMES (0x1240)
|
||||
#define STAT_RX_256_511_BYTES_FRAMES (0x1244)
|
||||
#define STAT_RX_512_1023_BYTE_FRAMES (0x1248)
|
||||
#define STAT_RX_1024_1518_BYTE_FRAMES (0x124C)
|
||||
#define STAT_RX_GREATER_1518_BYTE_FRAMES (0x1250)
|
||||
#define STAT_RX_TOTAL_FRAMES (0x1254)
|
||||
#define STAT_EEE_RX_LPI_TRANSITIONS (0x1258)
|
||||
#define STAT_EEE_RX_LPI_TIME (0x125C)
|
||||
#define STAT_RX_COUNTER_ROLLOVER_STATUS (0x127C)
|
||||
|
||||
#define STAT_TX_FCS_ERRORS (0x1280)
|
||||
#define STAT_TX_EXCESS_DEFERRAL_ERRORS (0x1284)
|
||||
#define STAT_TX_CARRIER_ERRORS (0x1288)
|
||||
#define STAT_TX_BAD_BYTE_COUNT (0x128C)
|
||||
#define STAT_TX_SINGLE_COLLISIONS (0x1290)
|
||||
#define STAT_TX_MULTIPLE_COLLISIONS (0x1294)
|
||||
#define STAT_TX_EXCESSIVE_COLLISION (0x1298)
|
||||
@@ -311,8 +326,21 @@
|
||||
#define STAT_TX_UNICAST_BYTE_COUNT (0x12A0)
|
||||
#define STAT_TX_BROADCAST_BYTE_COUNT (0x12A4)
|
||||
#define STAT_TX_MULTICAST_BYTE_COUNT (0x12A8)
|
||||
#define STAT_TX_UNICAST_FRAMES (0x12AC)
|
||||
#define STAT_TX_BROADCAST_FRAMES (0x12B0)
|
||||
#define STAT_TX_MULTICAST_FRAMES (0x12B4)
|
||||
#define STAT_TX_PAUSE_FRAMES (0x12B8)
|
||||
#define STAT_TX_64_BYTE_FRAMES (0x12BC)
|
||||
#define STAT_TX_65_127_BYTE_FRAMES (0x12C0)
|
||||
#define STAT_TX_128_255_BYTE_FRAMES (0x12C4)
|
||||
#define STAT_TX_256_511_BYTES_FRAMES (0x12C8)
|
||||
#define STAT_TX_512_1023_BYTE_FRAMES (0x12CC)
|
||||
#define STAT_TX_1024_1518_BYTE_FRAMES (0x12D0)
|
||||
#define STAT_TX_GREATER_1518_BYTE_FRAMES (0x12D4)
|
||||
#define STAT_TX_TOTAL_FRAMES (0x12D8)
|
||||
#define STAT_EEE_TX_LPI_TRANSITIONS (0x12DC)
|
||||
#define STAT_EEE_TX_LPI_TIME (0x12E0)
|
||||
#define STAT_TX_COUNTER_ROLLOVER_STATUS (0x12FC)
|
||||
|
||||
/* End of Register definitions */
|
||||
|
||||
@@ -594,4 +622,7 @@ struct lan743x_rx_buffer_info {
|
||||
#define RX_PROCESS_RESULT_PACKET_RECEIVED (1)
|
||||
#define RX_PROCESS_RESULT_PACKET_DROPPED (2)
|
||||
|
||||
u32 lan743x_csr_read(struct lan743x_adapter *adapter, int offset);
|
||||
void lan743x_csr_write(struct lan743x_adapter *adapter, int offset, u32 data);
|
||||
|
||||
#endif /* _LAN743X_H */
|
||||
|
Reference in New Issue
Block a user