From b88771af20948259f445f3f33661a9407dfcdb8e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 27 Jul 2022 12:14:45 +0200 Subject: [PATCH] 4.19-stable patches added patches: net-usb-ax88179_178a-needs-flag_send_zlp.patch --- ...usb-ax88179_178a-needs-flag_send_zlp.patch | 121 ++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 122 insertions(+) create mode 100644 queue-4.19/net-usb-ax88179_178a-needs-flag_send_zlp.patch diff --git a/queue-4.19/net-usb-ax88179_178a-needs-flag_send_zlp.patch b/queue-4.19/net-usb-ax88179_178a-needs-flag_send_zlp.patch new file mode 100644 index 00000000000..bd5cd345d7b --- /dev/null +++ b/queue-4.19/net-usb-ax88179_178a-needs-flag_send_zlp.patch @@ -0,0 +1,121 @@ +From 36a15e1cb134c0395261ba1940762703f778438c Mon Sep 17 00:00:00 2001 +From: Jose Alonso +Date: Mon, 13 Jun 2022 15:32:44 -0300 +Subject: net: usb: ax88179_178a needs FLAG_SEND_ZLP + +From: Jose Alonso + +commit 36a15e1cb134c0395261ba1940762703f778438c upstream. + +The extra byte inserted by usbnet.c when + (length % dev->maxpacket == 0) is causing problems to device. + +This patch sets FLAG_SEND_ZLP to avoid this. + +Tested with: 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet + +Problems observed: +====================================================================== +1) Using ssh/sshfs. The remote sshd daemon can abort with the message: + "message authentication code incorrect" + This happens because the tcp message sent is corrupted during the + USB "Bulk out". The device calculate the tcp checksum and send a + valid tcp message to the remote sshd. Then the encryption detects + the error and aborts. +2) NETDEV WATCHDOG: ... (ax88179_178a): transmit queue 0 timed out +3) Stop normal work without any log message. + The "Bulk in" continue receiving packets normally. + The host sends "Bulk out" and the device responds with -ECONNRESET. + (The netusb.c code tx_complete ignore -ECONNRESET) +Under normal conditions these errors take days to happen and in +intense usage take hours. + +A test with ping gives packet loss, showing that something is wrong: +ping -4 -s 462 {destination} # 462 = 512 - 42 - 8 +Not all packets fail. +My guess is that the device tries to find another packet starting +at the extra byte and will fail or not depending on the next +bytes (old buffer content). +====================================================================== + +Signed-off-by: Jose Alonso +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/usb/ax88179_178a.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/drivers/net/usb/ax88179_178a.c ++++ b/drivers/net/usb/ax88179_178a.c +@@ -1706,7 +1706,7 @@ static const struct driver_info ax88179_ + .link_reset = ax88179_link_reset, + .reset = ax88179_reset, + .stop = ax88179_stop, +- .flags = FLAG_ETHER | FLAG_FRAMING_AX, ++ .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .rx_fixup = ax88179_rx_fixup, + .tx_fixup = ax88179_tx_fixup, + }; +@@ -1719,7 +1719,7 @@ static const struct driver_info ax88178a + .link_reset = ax88179_link_reset, + .reset = ax88179_reset, + .stop = ax88179_stop, +- .flags = FLAG_ETHER | FLAG_FRAMING_AX, ++ .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .rx_fixup = ax88179_rx_fixup, + .tx_fixup = ax88179_tx_fixup, + }; +@@ -1732,7 +1732,7 @@ static const struct driver_info cypress_ + .link_reset = ax88179_link_reset, + .reset = ax88179_reset, + .stop = ax88179_stop, +- .flags = FLAG_ETHER | FLAG_FRAMING_AX, ++ .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .rx_fixup = ax88179_rx_fixup, + .tx_fixup = ax88179_tx_fixup, + }; +@@ -1745,7 +1745,7 @@ static const struct driver_info dlink_du + .link_reset = ax88179_link_reset, + .reset = ax88179_reset, + .stop = ax88179_stop, +- .flags = FLAG_ETHER | FLAG_FRAMING_AX, ++ .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .rx_fixup = ax88179_rx_fixup, + .tx_fixup = ax88179_tx_fixup, + }; +@@ -1758,7 +1758,7 @@ static const struct driver_info sitecom_ + .link_reset = ax88179_link_reset, + .reset = ax88179_reset, + .stop = ax88179_stop, +- .flags = FLAG_ETHER | FLAG_FRAMING_AX, ++ .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .rx_fixup = ax88179_rx_fixup, + .tx_fixup = ax88179_tx_fixup, + }; +@@ -1771,7 +1771,7 @@ static const struct driver_info samsung_ + .link_reset = ax88179_link_reset, + .reset = ax88179_reset, + .stop = ax88179_stop, +- .flags = FLAG_ETHER | FLAG_FRAMING_AX, ++ .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .rx_fixup = ax88179_rx_fixup, + .tx_fixup = ax88179_tx_fixup, + }; +@@ -1784,7 +1784,7 @@ static const struct driver_info lenovo_i + .link_reset = ax88179_link_reset, + .reset = ax88179_reset, + .stop = ax88179_stop, +- .flags = FLAG_ETHER | FLAG_FRAMING_AX, ++ .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .rx_fixup = ax88179_rx_fixup, + .tx_fixup = ax88179_tx_fixup, + }; +@@ -1797,7 +1797,7 @@ static const struct driver_info belkin_i + .link_reset = ax88179_link_reset, + .reset = ax88179_reset, + .stop = ax88179_stop, +- .flags = FLAG_ETHER | FLAG_FRAMING_AX, ++ .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .rx_fixup = ax88179_rx_fixup, + .tx_fixup = ax88179_tx_fixup, + }; diff --git a/queue-4.19/series b/queue-4.19/series index 8ff556f6b43..c96bf4782c6 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -55,3 +55,4 @@ tty-the-rest-stop-using-tty_schedule_flip.patch tty-drop-tty_schedule_flip.patch tty-extract-tty_flip_buffer_commit-from-tty_flip_buffer_push.patch tty-use-new-tty_insert_flip_string_and_push_buffer-in-pty_write.patch +net-usb-ax88179_178a-needs-flag_send_zlp.patch -- 2.47.3