diff options
author | Laura Abbott <labbott@redhat.com> | 2018-07-03 09:28:01 -0700 |
---|---|---|
committer | Laura Abbott <labbott@redhat.com> | 2018-07-03 09:28:01 -0700 |
commit | 217e6f09e3167d367c2226657d977229b6a3b7b5 (patch) | |
tree | 0d2daaa28c7b7a6bc3bb3444b6242cb596b8efb6 /bcm2837-lan78xx-fixes.patch | |
parent | 373b736296a91cf194015aa1cda217ad611ff154 (diff) | |
download | kernel-217e6f09e3167d367c2226657d977229b6a3b7b5.tar.gz kernel-217e6f09e3167d367c2226657d977229b6a3b7b5.tar.xz kernel-217e6f09e3167d367c2226657d977229b6a3b7b5.zip |
Linux v4.18-rc3-107-gd0fbad0aec1d
Diffstat (limited to 'bcm2837-lan78xx-fixes.patch')
-rw-r--r-- | bcm2837-lan78xx-fixes.patch | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/bcm2837-lan78xx-fixes.patch b/bcm2837-lan78xx-fixes.patch deleted file mode 100644 index 6d70cd36e..000000000 --- a/bcm2837-lan78xx-fixes.patch +++ /dev/null @@ -1,88 +0,0 @@ -From bce4fe9fa48df0cbbe842e80d9a520f7265b4cd4 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson <dave.stevenson@raspberrypi.org> -Date: Wed, 4 Apr 2018 16:34:24 +0100 -Subject: [PATCH 5/9] net: lan78xx: Allow for VLAN headers in timeout. - -The frame abort timeout being set by lan78xx_set_rx_max_frame_length -didn't account for any VLAN headers, resulting in very low -throughput if used with tagged VLANs. -Use VLAN_ETH_HLEN instead of ETH_HLEN to correct for this. - -See https://github.com/raspberrypi/linux/issues/2458 - -Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org> ---- - drivers/net/usb/lan78xx.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c -index 0867f7275852..5b46998a6dce 100644 ---- a/drivers/net/usb/lan78xx.c -+++ b/drivers/net/usb/lan78xx.c -@@ -2178,7 +2178,7 @@ static int lan78xx_change_mtu(struct net_device *netdev, int new_mtu) - if ((ll_mtu % dev->maxpacket) == 0) - return -EDOM; - -- ret = lan78xx_set_rx_max_frame_length(dev, new_mtu + ETH_HLEN); -+ ret = lan78xx_set_rx_max_frame_length(dev, new_mtu + VLAN_ETH_HLEN); - - netdev->mtu = new_mtu; - -@@ -2467,7 +2467,8 @@ static int lan78xx_reset(struct lan78xx_net *dev) - buf |= FCT_TX_CTL_EN_; - ret = lan78xx_write_reg(dev, FCT_TX_CTL, buf); - -- ret = lan78xx_set_rx_max_frame_length(dev, dev->net->mtu + ETH_HLEN); -+ ret = lan78xx_set_rx_max_frame_length(dev, -+ dev->net->mtu + VLAN_ETH_HLEN); - - ret = lan78xx_read_reg(dev, MAC_RX, &buf); - buf |= MAC_RX_RXEN_; --- -2.17.0 - -From 6fecd97fd35e9c624d101495ca34c83b1cb23e3d Mon Sep 17 00:00:00 2001 -From: Dave Stevenson <dave.stevenson@raspberrypi.org> -Date: Mon, 9 Apr 2018 14:31:54 +0100 -Subject: [PATCH 6/9] net: lan78xx: Request s/w csum check on VLAN tagged - packets. - -There appears to be some issue in the LAN78xx where the checksum -computed on a VLAN tagged packet is incorrect, or at least not -in the form that the kernel is after. This is most easily shown -by pinging a device via a VLAN tagged interface and it will dump -out the error message and stack trace from netdev_rx_csum_fault. -It has also been seen with standard TCP and UDP packets. - -Until this is fully understood, request that the network stack -computes the checksum on packets signalled as having a VLAN tag -applied. - -See https://github.com/raspberrypi/linux/issues/2458 - -Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org> ---- - drivers/net/usb/lan78xx.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c -index 5b46998a6dce..6b61bb21f2ae 100644 ---- a/drivers/net/usb/lan78xx.c -+++ b/drivers/net/usb/lan78xx.c -@@ -2920,8 +2920,12 @@ static void lan78xx_rx_csum_offload(struct lan78xx_net *dev, - struct sk_buff *skb, - u32 rx_cmd_a, u32 rx_cmd_b) - { -+ /* Checksum offload appears to be flawed if used with VLANs. -+ * Elect for sw checksum check instead. -+ */ - if (!(dev->net->features & NETIF_F_RXCSUM) || -- unlikely(rx_cmd_a & RX_CMD_A_ICSM_)) { -+ unlikely(rx_cmd_a & RX_CMD_A_ICSM_) || -+ (rx_cmd_a & RX_CMD_A_FVTG_)) { - skb->ip_summed = CHECKSUM_NONE; - } else { - skb->csum = ntohs((u16)(rx_cmd_b >> RX_CMD_B_CSUM_SHIFT_)); --- -2.17.0 - |