From 181582fc8add3b1192e8cbc8453b6de29eb42547 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 22 Aug 2018 17:00:03 +0200 Subject: [PATCH] drop broken networking patch --- ...registers-configuration-on-mtu-setup.patch | 67 ------------------- queue-4.4/series | 1 - ...registers-configuration-on-mtu-setup.patch | 67 ------------------- queue-4.9/series | 1 - 4 files changed, 136 deletions(-) delete mode 100644 queue-4.4/octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch delete mode 100644 queue-4.9/octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch diff --git a/queue-4.4/octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch b/queue-4.4/octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch deleted file mode 100644 index f535c2552f6..00000000000 --- a/queue-4.4/octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch +++ /dev/null @@ -1,67 +0,0 @@ -From foo@baz Wed Aug 22 10:28:26 CEST 2018 -From: Alexander Sverdlin -Date: Fri, 13 Jul 2018 17:31:50 +0200 -Subject: octeon_mgmt: Fix MIX registers configuration on MTU setup - -From: Alexander Sverdlin - -[ Upstream commit 4aac0b43474d18f6160302a3caa147d77fa3baa1 ] - -octeon_mgmt driver doesn't drop RX frames that are 1-4 bytes bigger than -MTU set for the corresponding interface. The problem is in the -AGL_GMX_RX0/1_FRM_MAX register setting, which should not account for VLAN -tagging. - -According to Octeon HW manual: -"For tagged frames, MAX increases by four bytes for each VLAN found up to a -maximum of two VLANs, or MAX + 8 bytes." - -OCTEON_FRAME_HEADER_LEN "define" is fine for ring buffer management, but -should not be used for AGL_GMX_RX0/1_FRM_MAX. - -The problem could be easily reproduced using "ping" command. If affected -system has default MTU 1500, other host (having MTU >= 1504) can -successfully "ping" the affected system with payload size 1473-1476, -resulting in IP packets of size 1501-1504 accepted by the mgmt driver. -Fixed system still accepts IP packets of 1500 bytes even with VLAN tagging, -because the limits are lifted in HW as expected, for every VLAN tag. - -Signed-off-by: Alexander Sverdlin -Signed-off-by: David S. Miller -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - drivers/net/ethernet/octeon/octeon_mgmt.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - ---- a/drivers/net/ethernet/octeon/octeon_mgmt.c -+++ b/drivers/net/ethernet/octeon/octeon_mgmt.c -@@ -644,7 +644,7 @@ static int octeon_mgmt_set_mac_address(s - static int octeon_mgmt_change_mtu(struct net_device *netdev, int new_mtu) - { - struct octeon_mgmt *p = netdev_priv(netdev); -- int size_without_fcs = new_mtu + OCTEON_MGMT_RX_HEADROOM; -+ int max_packet = new_mtu + ETH_HLEN + ETH_FCS_LEN; - - /* Limit the MTU to make sure the ethernet packets are between - * 64 bytes and 16383 bytes. -@@ -658,9 +658,17 @@ static int octeon_mgmt_change_mtu(struct - - netdev->mtu = new_mtu; - -- cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_MAX, size_without_fcs); -+ /* HW lifts the limit if the frame is VLAN tagged -+ * (+4 bytes per each tag, up to two tags) -+ */ -+ cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_MAX, max_packet); -+ /* Set the hardware to truncate packets larger than the MTU. The jabber -+ * register must be set to a multiple of 8 bytes, so round up. JABBER is -+ * an unconditional limit, so we need to account for two possible VLAN -+ * tags. -+ */ - cvmx_write_csr(p->agl + AGL_GMX_RX_JABBER, -- (size_without_fcs + 7) & 0xfff8); -+ (max_packet + 7 + VLAN_HLEN * 2) & 0xfff8); - - return 0; - } diff --git a/queue-4.4/series b/queue-4.4/series index dd38d01ddba..7a70d6398af 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -58,7 +58,6 @@ qlogic-check-kstrtoul-for-errors.patch tcp-remove-delayed-ack-events-in-dctcp.patch drm-nouveau-gem-off-by-one-bugs-in-nouveau_gem_pushbuf_reloc_apply.patch net-ethernet-freescale-fman-fix-cross-build-error.patch -octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch net-usb-rtl8150-demote-allmulti-message-to-dev_dbg.patch net-qca_spi-avoid-packet-drop-during-initial-sync.patch net-qca_spi-make-sure-the-qca7000-reset-is-triggered.patch diff --git a/queue-4.9/octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch b/queue-4.9/octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch deleted file mode 100644 index a8a18a76aa7..00000000000 --- a/queue-4.9/octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch +++ /dev/null @@ -1,67 +0,0 @@ -From foo@baz Wed Aug 22 09:42:09 CEST 2018 -From: Alexander Sverdlin -Date: Fri, 13 Jul 2018 17:31:50 +0200 -Subject: octeon_mgmt: Fix MIX registers configuration on MTU setup - -From: Alexander Sverdlin - -[ Upstream commit 4aac0b43474d18f6160302a3caa147d77fa3baa1 ] - -octeon_mgmt driver doesn't drop RX frames that are 1-4 bytes bigger than -MTU set for the corresponding interface. The problem is in the -AGL_GMX_RX0/1_FRM_MAX register setting, which should not account for VLAN -tagging. - -According to Octeon HW manual: -"For tagged frames, MAX increases by four bytes for each VLAN found up to a -maximum of two VLANs, or MAX + 8 bytes." - -OCTEON_FRAME_HEADER_LEN "define" is fine for ring buffer management, but -should not be used for AGL_GMX_RX0/1_FRM_MAX. - -The problem could be easily reproduced using "ping" command. If affected -system has default MTU 1500, other host (having MTU >= 1504) can -successfully "ping" the affected system with payload size 1473-1476, -resulting in IP packets of size 1501-1504 accepted by the mgmt driver. -Fixed system still accepts IP packets of 1500 bytes even with VLAN tagging, -because the limits are lifted in HW as expected, for every VLAN tag. - -Signed-off-by: Alexander Sverdlin -Signed-off-by: David S. Miller -Signed-off-by: Sasha Levin -Signed-off-by: Greg Kroah-Hartman ---- - drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - ---- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c -+++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c -@@ -643,7 +643,7 @@ static int octeon_mgmt_set_mac_address(s - static int octeon_mgmt_change_mtu(struct net_device *netdev, int new_mtu) - { - struct octeon_mgmt *p = netdev_priv(netdev); -- int size_without_fcs = new_mtu + OCTEON_MGMT_RX_HEADROOM; -+ int max_packet = new_mtu + ETH_HLEN + ETH_FCS_LEN; - - /* Limit the MTU to make sure the ethernet packets are between - * 64 bytes and 16383 bytes. -@@ -657,9 +657,17 @@ static int octeon_mgmt_change_mtu(struct - - netdev->mtu = new_mtu; - -- cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_MAX, size_without_fcs); -+ /* HW lifts the limit if the frame is VLAN tagged -+ * (+4 bytes per each tag, up to two tags) -+ */ -+ cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_MAX, max_packet); -+ /* Set the hardware to truncate packets larger than the MTU. The jabber -+ * register must be set to a multiple of 8 bytes, so round up. JABBER is -+ * an unconditional limit, so we need to account for two possible VLAN -+ * tags. -+ */ - cvmx_write_csr(p->agl + AGL_GMX_RX_JABBER, -- (size_without_fcs + 7) & 0xfff8); -+ (max_packet + 7 + VLAN_HLEN * 2) & 0xfff8); - - return 0; - } diff --git a/queue-4.9/series b/queue-4.9/series index b30b998b956..594c9e306cf 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -108,7 +108,6 @@ pinctrl-nsp-off-by-ones-in-nsp_pinmux_enable.patch pinctrl-nsp-fix-potential-null-dereference.patch drm-nouveau-gem-off-by-one-bugs-in-nouveau_gem_pushbuf_reloc_apply.patch net-ethernet-freescale-fman-fix-cross-build-error.patch -octeon_mgmt-fix-mix-registers-configuration-on-mtu-setup.patch net-usb-rtl8150-demote-allmulti-message-to-dev_dbg.patch pci-versatile-fix-i-o-space-page-leak.patch net-qca_spi-avoid-packet-drop-during-initial-sync.patch -- 2.47.3