r8169: add tally counter fields added with RTL8125
Heiner Kallweit
maintainerPATCH 1/1 r8169: add tally counter fields added with RTL8125
RTL8125 added fields to the tally counter, what may result in the chip dma'ing these new fields to unallocated memory. Therefore make sure that the allocated memory area is big enough to hold all of the tally counter values, even if we use only parts of it.
--- drivers/net/ethernet/realtek/r8169_main.c | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+)
drivers/net/ethernet/realtek/r8169_main.c +27 -0
@@ -579,6 +579,33 @@ struct rtl8169_counters {__le32 rx_multicast;__le16 tx_aborted;__le16 tx_underrun; +/* new since RTL8125 */ +__le64 tx_octets; +__le64 rx_octets; +__le64 rx_multicast64; +__le64 tx_unicast64; +__le64 tx_broadcast64; +__le64 tx_multicast64; +__le32 tx_pause_on; +__le32 tx_pause_off; +__le32 tx_pause_all; +__le32 tx_deferred; +__le32 tx_late_collision; +__le32 tx_all_collision; +__le32 tx_aborted32; +__le32 align_errors32; +__le32 rx_frame_too_long; +__le32 rx_runt; +__le32 rx_pause_on; +__le32 rx_pause_off; +__le32 rx_pause_all; +__le32 rx_unknown_opcode; +__le32 rx_mac_error; +__le32 tx_underrun32; +__le32 rx_mac_missed; +__le32 rx_tcam_dropped; +__le32 tdu; +__le32 rdu; };struct rtl8169_tc_offsets {
Signature · 1 line
2.46.1
Quoted 8 lines · Heiner Kallweit
RTL8125 added fields to the tally counter, what may result in the chip dma'ing these new fields to unallocated memory. Therefore make sure that the allocated memory area is big enough to hold all of the tally counter values, even if we use only parts of it.
Fixes f1bce4ad2f1c ("r8169: add support for RTL8125")Signed-off-by Heiner Kallweit <[email protected]>
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 10 lines · On Tue, 17 Sep 2024 23:04:46 +0200 you wrote:
RTL8125 added fields to the tally counter, what may result in the chip dma'ing these new fields to unallocated memory. Therefore make sure that the allocated memory area is big enough to hold all of the tally counter values, even if we use only parts of it.
Fixes f1bce4ad2f1c ("r8169: add support for RTL8125")Signed-off-by Heiner Kallweit <[email protected]>[...]
Here is the summary with links:
- [net] r8169: add tally counter fields added with RTL8125
https://git.kernel.org/netdev/net/c/ced8e8b8f40a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html