1 From ced8e8b8f40accfcce4a2bbd8b150aa76d5eff9a Mon Sep 17 00:00:00 2001
2 From: Heiner Kallweit <hkallweit1@gmail.com>
3 Date: Tue, 17 Sep 2024 23:04:46 +0200
4 Subject: [PATCH 46/47] r8169: add tally counter fields added with RTL8125
6 RTL8125 added fields to the tally counter, what may result in the chip
7 dma'ing these new fields to unallocated memory. Therefore make sure
8 that the allocated memory area is big enough to hold all of the
9 tally counter values, even if we use only parts of it.
11 Fixes: f1bce4ad2f1c ("r8169: add support for RTL8125")
12 Cc: stable@vger.kernel.org
13 Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
14 Reviewed-by: Simon Horman <horms@kernel.org>
15 Link: https://patch.msgid.link/741d26a9-2b2b-485d-91d9-ecb302e345b5@gmail.com
16 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
18 drivers/net/ethernet/realtek/r8169_main.c | 27 +++++++++++++++++++++++
19 1 file changed, 27 insertions(+)
21 --- a/drivers/net/ethernet/realtek/r8169_main.c
22 +++ b/drivers/net/ethernet/realtek/r8169_main.c
23 @@ -579,6 +579,33 @@ struct rtl8169_counters {
27 + /* new since RTL8125 */
30 + __le64 rx_multicast64;
31 + __le64 tx_unicast64;
32 + __le64 tx_broadcast64;
33 + __le64 tx_multicast64;
35 + __le32 tx_pause_off;
36 + __le32 tx_pause_all;
38 + __le32 tx_late_collision;
39 + __le32 tx_all_collision;
40 + __le32 tx_aborted32;
41 + __le32 align_errors32;
42 + __le32 rx_frame_too_long;
45 + __le32 rx_pause_off;
46 + __le32 rx_pause_all;
47 + __le32 rx_unknown_opcode;
48 + __le32 rx_mac_error;
49 + __le32 tx_underrun32;
50 + __le32 rx_mac_missed;
51 + __le32 rx_tcam_dropped;
56 struct rtl8169_tc_offsets {