Skip to content

Commit 847f0a2

Browse files
hkallweitkuba-moo
authored andcommitted
r8169: disable hw csum for short packets on all chip versions
RTL8125B has same or similar short packet hw padding bug as RTL8168evl. The main workaround has been extended accordingly, however we have to disable also hw checksumming for short packets on affected new chip versions. Instead of checking for an affected chip version let's simply disable hw checksumming for short packets in general. v2: - remove the version checks and disable short packet hw csum in general - reflect this in commit title and message Fixes: 0439297 ("r8169: add support for RTL8125B") Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/7fbb35f0-e244-ef65-aa55-3872d7d38698@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent cc6528b commit 847f0a2

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4343,18 +4343,9 @@ static netdev_features_t rtl8169_features_check(struct sk_buff *skb,
43434343
rtl_chip_supports_csum_v2(tp))
43444344
features &= ~NETIF_F_ALL_TSO;
43454345
} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
4346-
if (skb->len < ETH_ZLEN) {
4347-
switch (tp->mac_version) {
4348-
case RTL_GIGA_MAC_VER_11:
4349-
case RTL_GIGA_MAC_VER_12:
4350-
case RTL_GIGA_MAC_VER_17:
4351-
case RTL_GIGA_MAC_VER_34:
4352-
features &= ~NETIF_F_CSUM_MASK;
4353-
break;
4354-
default:
4355-
break;
4356-
}
4357-
}
4346+
/* work around hw bug on some chip versions */
4347+
if (skb->len < ETH_ZLEN)
4348+
features &= ~NETIF_F_CSUM_MASK;
43584349

43594350
if (transport_offset > TCPHO_MAX &&
43604351
rtl_chip_supports_csum_v2(tp))

0 commit comments

Comments
 (0)