Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

r8152: disable RX aggregation on Dell TB16 dock

r8153 on Dell TB15/16 dock corrupts rx packets.

This change is suggested by Realtek. They guess that the XHCI controller
doesn't have enough buffer, and their guesswork is correct, once the RX
aggregation gets disabled, the issue is gone.

ASMedia is currently working on a real sulotion for this issue.

Dell and ODM confirm the bcdDevice and iSerialNumber is unique for TB16.

Note that TB15 has different bcdDevice and iSerialNumber, which are not
unique values. If you still have TB15, please contact Dell to replace it
with TB16.

BugLink: https://bugs.launchpad.net/bugs/1729674
Cc: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Kai-Heng Feng and committed by
David S. Miller
0b165514 4df0bfc7

+13
+13
drivers/net/usb/r8152.c
··· 606 606 PHY_RESET, 607 607 SCHEDULE_NAPI, 608 608 GREEN_ETHERNET, 609 + DELL_TB_RX_AGG_BUG, 609 610 }; 610 611 611 612 /* Define these values to match your device */ ··· 1799 1798 dev_kfree_skb_any(skb); 1800 1799 1801 1800 remain = agg_buf_sz - (int)(tx_agg_align(tx_data) - agg->head); 1801 + 1802 + if (test_bit(DELL_TB_RX_AGG_BUG, &tp->flags)) 1803 + break; 1802 1804 } 1803 1805 1804 1806 if (!skb_queue_empty(&skb_head)) { ··· 4137 4133 /* rx aggregation */ 4138 4134 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_USB_CTRL); 4139 4135 ocp_data &= ~(RX_AGG_DISABLE | RX_ZERO_EN); 4136 + if (test_bit(DELL_TB_RX_AGG_BUG, &tp->flags)) 4137 + ocp_data |= RX_AGG_DISABLE; 4138 + 4140 4139 ocp_write_word(tp, MCU_TYPE_USB, USB_USB_CTRL, ocp_data); 4141 4140 4142 4141 rtl_tally_reset(tp); ··· 5212 5205 if (tp->version == RTL_VER_01) { 5213 5206 netdev->features &= ~NETIF_F_RXCSUM; 5214 5207 netdev->hw_features &= ~NETIF_F_RXCSUM; 5208 + } 5209 + 5210 + if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && 5211 + udev->serial && !strcmp(udev->serial, "000001000000")) { 5212 + dev_info(&udev->dev, "Dell TB16 Dock, disable RX aggregation"); 5213 + set_bit(DELL_TB_RX_AGG_BUG, &tp->flags); 5215 5214 } 5216 5215 5217 5216 netdev->ethtool_ops = &ops;