]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch from everywhere
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Aug 2020 09:59:01 +0000 (11:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Aug 2020 09:59:01 +0000 (11:59 +0200)
14 files changed:
queue-4.14/series
queue-4.14/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch [deleted file]
queue-4.19/series
queue-4.19/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch [deleted file]
queue-4.4/series
queue-4.4/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch [deleted file]
queue-4.9/series
queue-4.9/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch [deleted file]
queue-5.4/series
queue-5.4/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch [deleted file]
queue-5.7/series
queue-5.7/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch [deleted file]
queue-5.8/series
queue-5.8/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch [deleted file]

index 3a6dc63ffc5a74e9b26ea0008c6e569e767c805d..c7c06ce1ba2811e43c629b4e570e9d236bfc5915 100644 (file)
@@ -196,7 +196,6 @@ mfd-arizona-ensure-32k-clock-is-put-on-driver-unbind.patch
 rdma-ipoib-return-void-from-ipoib_ib_dev_stop.patch
 usb-serial-ftdi_sio-make-process-packet-buffer-unsig.patch
 usb-serial-ftdi_sio-clean-up-receive-processing.patch
-usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
 gpu-ipu-v3-image-convert-combine-rotate-no-rotate-ir.patch
 dm-rq-don-t-call-blk_mq_queue_stopped-in-dm_stop_que.patch
 iommu-omap-check-for-failure-of-a-call-to-omap_iommu.patch
diff --git a/queue-4.14/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch b/queue-4.14/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
deleted file mode 100644 (file)
index a34b8f2..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-From 4965e3b95521b5704752fd5a08a02d3acbc2ec91 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jul 2020 14:49:53 +0200
-Subject: USB: serial: ftdi_sio: fix break and sysrq handling
-
-From: Johan Hovold <johan@kernel.org>
-
-[ Upstream commit 733fff67941dad64b8a630450b8372b1873edc41 ]
-
-Only the last NUL in a packet should be flagged as a break character,
-for example, to avoid dropping unrelated characters when IGNBRK is set.
-
-Also make sysrq work by consuming the break character instead of having
-it immediately cancel the sysrq request, and by not processing it
-prematurely to avoid triggering a sysrq based on an unrelated character
-received in the same packet (which was received *before* the break).
-
-Note that the break flag can be left set also for a packet received
-immediately following a break and that and an ending NUL in such a
-packet will continue to be reported as a break as there's no good way to
-tell it apart from an actual break.
-
-Tested on FT232R and FT232H.
-
-Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break")
-Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
-Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/serial/ftdi_sio.c | 24 +++++++++++++++++-------
- 1 file changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
-index 8abb30c797d30..0574bf03b3171 100644
---- a/drivers/usb/serial/ftdi_sio.c
-+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -2045,6 +2045,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-               struct ftdi_private *priv, unsigned char *buf, int len)
- {
-       unsigned char status;
-+      bool brkint = false;
-       int i;
-       char flag;
-@@ -2096,13 +2097,17 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-        */
-       flag = TTY_NORMAL;
-       if (buf[1] & FTDI_RS_ERR_MASK) {
--              /* Break takes precedence over parity, which takes precedence
--               * over framing errors */
--              if (buf[1] & FTDI_RS_BI) {
--                      flag = TTY_BREAK;
-+              /*
-+               * Break takes precedence over parity, which takes precedence
-+               * over framing errors. Note that break is only associated
-+               * with the last character in the buffer and only when it's a
-+               * NUL.
-+               */
-+              if (buf[1] & FTDI_RS_BI && buf[len - 1] == '\0') {
-                       port->icount.brk++;
--                      usb_serial_handle_break(port);
--              } else if (buf[1] & FTDI_RS_PE) {
-+                      brkint = true;
-+              }
-+              if (buf[1] & FTDI_RS_PE) {
-                       flag = TTY_PARITY;
-                       port->icount.parity++;
-               } else if (buf[1] & FTDI_RS_FE) {
-@@ -2118,8 +2123,13 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-       port->icount.rx += len - 2;
--      if (port->port.console && port->sysrq) {
-+      if (brkint || (port->port.console && port->sysrq)) {
-               for (i = 2; i < len; i++) {
-+                      if (brkint && i == len - 1) {
-+                              if (usb_serial_handle_break(port))
-+                                      return len - 3;
-+                              flag = TTY_BREAK;
-+                      }
-                       if (usb_serial_handle_sysrq_char(port, buf[i]))
-                               continue;
-                       tty_insert_flip_char(&port->port, buf[i], flag);
--- 
-2.25.1
-
index 76312511f3cf40eb8c0820610d8ff06899207c53..faba21d881ccd28b9f6406d5bf7418f5ceefe9d0 100644 (file)
@@ -53,7 +53,6 @@ media-rockchip-rga-introduce-color-fmt-macros-and-re.patch
 media-rockchip-rga-only-set-output-csc-mode-for-rgb-.patch
 usb-serial-ftdi_sio-make-process-packet-buffer-unsig.patch
 usb-serial-ftdi_sio-clean-up-receive-processing.patch
-usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
 mmc-renesas_sdhi_internal_dmac-clean-up-the-code-for.patch
 gpu-ipu-v3-image-convert-combine-rotate-no-rotate-ir.patch
 dm-rq-don-t-call-blk_mq_queue_stopped-in-dm_stop_que.patch
diff --git a/queue-4.19/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch b/queue-4.19/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
deleted file mode 100644 (file)
index 19e55be..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-From cda7b26dd90d8dca943dd48b568753cb5826c8fa Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jul 2020 14:49:53 +0200
-Subject: USB: serial: ftdi_sio: fix break and sysrq handling
-
-From: Johan Hovold <johan@kernel.org>
-
-[ Upstream commit 733fff67941dad64b8a630450b8372b1873edc41 ]
-
-Only the last NUL in a packet should be flagged as a break character,
-for example, to avoid dropping unrelated characters when IGNBRK is set.
-
-Also make sysrq work by consuming the break character instead of having
-it immediately cancel the sysrq request, and by not processing it
-prematurely to avoid triggering a sysrq based on an unrelated character
-received in the same packet (which was received *before* the break).
-
-Note that the break flag can be left set also for a packet received
-immediately following a break and that and an ending NUL in such a
-packet will continue to be reported as a break as there's no good way to
-tell it apart from an actual break.
-
-Tested on FT232R and FT232H.
-
-Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break")
-Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
-Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/serial/ftdi_sio.c | 24 +++++++++++++++++-------
- 1 file changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
-index ce9cc1f90b052..aa72ce2642bf1 100644
---- a/drivers/usb/serial/ftdi_sio.c
-+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -2040,6 +2040,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-               struct ftdi_private *priv, unsigned char *buf, int len)
- {
-       unsigned char status;
-+      bool brkint = false;
-       int i;
-       char flag;
-@@ -2091,13 +2092,17 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-        */
-       flag = TTY_NORMAL;
-       if (buf[1] & FTDI_RS_ERR_MASK) {
--              /* Break takes precedence over parity, which takes precedence
--               * over framing errors */
--              if (buf[1] & FTDI_RS_BI) {
--                      flag = TTY_BREAK;
-+              /*
-+               * Break takes precedence over parity, which takes precedence
-+               * over framing errors. Note that break is only associated
-+               * with the last character in the buffer and only when it's a
-+               * NUL.
-+               */
-+              if (buf[1] & FTDI_RS_BI && buf[len - 1] == '\0') {
-                       port->icount.brk++;
--                      usb_serial_handle_break(port);
--              } else if (buf[1] & FTDI_RS_PE) {
-+                      brkint = true;
-+              }
-+              if (buf[1] & FTDI_RS_PE) {
-                       flag = TTY_PARITY;
-                       port->icount.parity++;
-               } else if (buf[1] & FTDI_RS_FE) {
-@@ -2113,8 +2118,13 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-       port->icount.rx += len - 2;
--      if (port->port.console && port->sysrq) {
-+      if (brkint || (port->port.console && port->sysrq)) {
-               for (i = 2; i < len; i++) {
-+                      if (brkint && i == len - 1) {
-+                              if (usb_serial_handle_break(port))
-+                                      return len - 3;
-+                              flag = TTY_BREAK;
-+                      }
-                       if (usb_serial_handle_sysrq_char(port, buf[i]))
-                               continue;
-                       tty_insert_flip_char(&port->port, buf[i], flag);
--- 
-2.25.1
-
index 9158618a78195172222d4618d5dd61ffcd427c6d..abfd6bcc3d0b57c448a2f2cfa4951c76f7d6700d 100644 (file)
@@ -133,7 +133,6 @@ kprobes-fix-null-pointer-dereference-at-kprobe_ftrace_handler.patch
 pseries-fix-64-bit-logical-memory-block-panic.patch
 usb-serial-ftdi_sio-make-process-packet-buffer-unsig.patch
 usb-serial-ftdi_sio-clean-up-receive-processing.patch
-usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
 iommu-omap-check-for-failure-of-a-call-to-omap_iommu.patch
 iommu-vt-d-enforce-pasid-devtlb-field-mask.patch
 i2c-rcar-slave-only-send-stop-event-when-we-have-bee.patch
diff --git a/queue-4.4/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch b/queue-4.4/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
deleted file mode 100644 (file)
index f0cb12f..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-From fa9cb56cffc3e2c6d0a157b8d0109079ab0ba43d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jul 2020 14:49:53 +0200
-Subject: USB: serial: ftdi_sio: fix break and sysrq handling
-
-From: Johan Hovold <johan@kernel.org>
-
-[ Upstream commit 733fff67941dad64b8a630450b8372b1873edc41 ]
-
-Only the last NUL in a packet should be flagged as a break character,
-for example, to avoid dropping unrelated characters when IGNBRK is set.
-
-Also make sysrq work by consuming the break character instead of having
-it immediately cancel the sysrq request, and by not processing it
-prematurely to avoid triggering a sysrq based on an unrelated character
-received in the same packet (which was received *before* the break).
-
-Note that the break flag can be left set also for a packet received
-immediately following a break and that and an ending NUL in such a
-packet will continue to be reported as a break as there's no good way to
-tell it apart from an actual break.
-
-Tested on FT232R and FT232H.
-
-Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break")
-Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
-Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/serial/ftdi_sio.c | 24 +++++++++++++++++-------
- 1 file changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
-index 0afea511eb376..2dfec4c1ef4de 100644
---- a/drivers/usb/serial/ftdi_sio.c
-+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -2054,6 +2054,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-               struct ftdi_private *priv, unsigned char *buf, int len)
- {
-       unsigned char status;
-+      bool brkint = false;
-       int i;
-       char flag;
-@@ -2105,13 +2106,17 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-        */
-       flag = TTY_NORMAL;
-       if (buf[1] & FTDI_RS_ERR_MASK) {
--              /* Break takes precedence over parity, which takes precedence
--               * over framing errors */
--              if (buf[1] & FTDI_RS_BI) {
--                      flag = TTY_BREAK;
-+              /*
-+               * Break takes precedence over parity, which takes precedence
-+               * over framing errors. Note that break is only associated
-+               * with the last character in the buffer and only when it's a
-+               * NUL.
-+               */
-+              if (buf[1] & FTDI_RS_BI && buf[len - 1] == '\0') {
-                       port->icount.brk++;
--                      usb_serial_handle_break(port);
--              } else if (buf[1] & FTDI_RS_PE) {
-+                      brkint = true;
-+              }
-+              if (buf[1] & FTDI_RS_PE) {
-                       flag = TTY_PARITY;
-                       port->icount.parity++;
-               } else if (buf[1] & FTDI_RS_FE) {
-@@ -2127,8 +2132,13 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-       port->icount.rx += len - 2;
--      if (port->port.console && port->sysrq) {
-+      if (brkint || (port->port.console && port->sysrq)) {
-               for (i = 2; i < len; i++) {
-+                      if (brkint && i == len - 1) {
-+                              if (usb_serial_handle_break(port))
-+                                      return len - 3;
-+                              flag = TTY_BREAK;
-+                      }
-                       if (usb_serial_handle_sysrq_char(port, buf[i]))
-                               continue;
-                       tty_insert_flip_char(&port->port, buf[i], flag);
--- 
-2.25.1
-
index d4fa35c61bbcb99512cc059994a86f704a2059d4..7a91eba103b6c16ce49d3a1881afccae7e6df798 100644 (file)
@@ -192,7 +192,6 @@ pseries-fix-64-bit-logical-memory-block-panic.patch
 mfd-arizona-ensure-32k-clock-is-put-on-driver-unbind.patch
 usb-serial-ftdi_sio-make-process-packet-buffer-unsig.patch
 usb-serial-ftdi_sio-clean-up-receive-processing.patch
-usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
 gpu-ipu-v3-image-convert-combine-rotate-no-rotate-ir.patch
 iommu-omap-check-for-failure-of-a-call-to-omap_iommu.patch
 iommu-vt-d-enforce-pasid-devtlb-field-mask.patch
diff --git a/queue-4.9/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch b/queue-4.9/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
deleted file mode 100644 (file)
index adcad04..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-From 2694437ebe8d8ed66da545102241fa5b5f74ee9c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jul 2020 14:49:53 +0200
-Subject: USB: serial: ftdi_sio: fix break and sysrq handling
-
-From: Johan Hovold <johan@kernel.org>
-
-[ Upstream commit 733fff67941dad64b8a630450b8372b1873edc41 ]
-
-Only the last NUL in a packet should be flagged as a break character,
-for example, to avoid dropping unrelated characters when IGNBRK is set.
-
-Also make sysrq work by consuming the break character instead of having
-it immediately cancel the sysrq request, and by not processing it
-prematurely to avoid triggering a sysrq based on an unrelated character
-received in the same packet (which was received *before* the break).
-
-Note that the break flag can be left set also for a packet received
-immediately following a break and that and an ending NUL in such a
-packet will continue to be reported as a break as there's no good way to
-tell it apart from an actual break.
-
-Tested on FT232R and FT232H.
-
-Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break")
-Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
-Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/serial/ftdi_sio.c | 24 +++++++++++++++++-------
- 1 file changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
-index 0c8b24ff44a05..bb29d5fd032fd 100644
---- a/drivers/usb/serial/ftdi_sio.c
-+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -2054,6 +2054,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-               struct ftdi_private *priv, unsigned char *buf, int len)
- {
-       unsigned char status;
-+      bool brkint = false;
-       int i;
-       char flag;
-@@ -2105,13 +2106,17 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-        */
-       flag = TTY_NORMAL;
-       if (buf[1] & FTDI_RS_ERR_MASK) {
--              /* Break takes precedence over parity, which takes precedence
--               * over framing errors */
--              if (buf[1] & FTDI_RS_BI) {
--                      flag = TTY_BREAK;
-+              /*
-+               * Break takes precedence over parity, which takes precedence
-+               * over framing errors. Note that break is only associated
-+               * with the last character in the buffer and only when it's a
-+               * NUL.
-+               */
-+              if (buf[1] & FTDI_RS_BI && buf[len - 1] == '\0') {
-                       port->icount.brk++;
--                      usb_serial_handle_break(port);
--              } else if (buf[1] & FTDI_RS_PE) {
-+                      brkint = true;
-+              }
-+              if (buf[1] & FTDI_RS_PE) {
-                       flag = TTY_PARITY;
-                       port->icount.parity++;
-               } else if (buf[1] & FTDI_RS_FE) {
-@@ -2127,8 +2132,13 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-       port->icount.rx += len - 2;
--      if (port->port.console && port->sysrq) {
-+      if (brkint || (port->port.console && port->sysrq)) {
-               for (i = 2; i < len; i++) {
-+                      if (brkint && i == len - 1) {
-+                              if (usb_serial_handle_break(port))
-+                                      return len - 3;
-+                              flag = TTY_BREAK;
-+                      }
-                       if (usb_serial_handle_sysrq_char(port, buf[i]))
-                               continue;
-                       tty_insert_flip_char(&port->port, buf[i], flag);
--- 
-2.25.1
-
index 4e4e7a2920dc3a34bbcbf38901b6efe6b69b8610..6db35546b66119633ab7a5900676d58d700aedb8 100644 (file)
@@ -88,7 +88,6 @@ selftests-bpf-test_progs-indicate-to-shell-on-non-ac.patch
 selftests-bpf-test_progs-use-another-shell-exit-on-n.patch
 usb-serial-ftdi_sio-make-process-packet-buffer-unsig.patch
 usb-serial-ftdi_sio-clean-up-receive-processing.patch
-usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
 crypto-af_alg-fix-regression-on-empty-requests.patch
 devres-keep-both-device-name-and-resource-name-in-pr.patch
 rdma-counter-only-bind-user-qps-in-auto-mode.patch
diff --git a/queue-5.4/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch b/queue-5.4/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
deleted file mode 100644 (file)
index 427e4dc..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-From 3b8d18c85b3304ff5e5b281c1ad216da1c105c2b Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jul 2020 14:49:53 +0200
-Subject: USB: serial: ftdi_sio: fix break and sysrq handling
-
-From: Johan Hovold <johan@kernel.org>
-
-[ Upstream commit 733fff67941dad64b8a630450b8372b1873edc41 ]
-
-Only the last NUL in a packet should be flagged as a break character,
-for example, to avoid dropping unrelated characters when IGNBRK is set.
-
-Also make sysrq work by consuming the break character instead of having
-it immediately cancel the sysrq request, and by not processing it
-prematurely to avoid triggering a sysrq based on an unrelated character
-received in the same packet (which was received *before* the break).
-
-Note that the break flag can be left set also for a packet received
-immediately following a break and that and an ending NUL in such a
-packet will continue to be reported as a break as there's no good way to
-tell it apart from an actual break.
-
-Tested on FT232R and FT232H.
-
-Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break")
-Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
-Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/serial/ftdi_sio.c | 24 +++++++++++++++++-------
- 1 file changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
-index 33f1cca7eaa61..07b146d7033a6 100644
---- a/drivers/usb/serial/ftdi_sio.c
-+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -2483,6 +2483,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-               struct ftdi_private *priv, unsigned char *buf, int len)
- {
-       unsigned char status;
-+      bool brkint = false;
-       int i;
-       char flag;
-@@ -2534,13 +2535,17 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-        */
-       flag = TTY_NORMAL;
-       if (buf[1] & FTDI_RS_ERR_MASK) {
--              /* Break takes precedence over parity, which takes precedence
--               * over framing errors */
--              if (buf[1] & FTDI_RS_BI) {
--                      flag = TTY_BREAK;
-+              /*
-+               * Break takes precedence over parity, which takes precedence
-+               * over framing errors. Note that break is only associated
-+               * with the last character in the buffer and only when it's a
-+               * NUL.
-+               */
-+              if (buf[1] & FTDI_RS_BI && buf[len - 1] == '\0') {
-                       port->icount.brk++;
--                      usb_serial_handle_break(port);
--              } else if (buf[1] & FTDI_RS_PE) {
-+                      brkint = true;
-+              }
-+              if (buf[1] & FTDI_RS_PE) {
-                       flag = TTY_PARITY;
-                       port->icount.parity++;
-               } else if (buf[1] & FTDI_RS_FE) {
-@@ -2556,8 +2561,13 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-       port->icount.rx += len - 2;
--      if (port->port.console && port->sysrq) {
-+      if (brkint || (port->port.console && port->sysrq)) {
-               for (i = 2; i < len; i++) {
-+                      if (brkint && i == len - 1) {
-+                              if (usb_serial_handle_break(port))
-+                                      return len - 3;
-+                              flag = TTY_BREAK;
-+                      }
-                       if (usb_serial_handle_sysrq_char(port, buf[i]))
-                               continue;
-                       tty_insert_flip_char(&port->port, buf[i], flag);
--- 
-2.25.1
-
index e3ced0e46dcb0fce59b86a92720fd2ddb5ad789a..dbfb2ed38ec47d1514e5b689a19a66ea846252a6 100644 (file)
@@ -116,7 +116,6 @@ selftests-bpf-test_progs-use-another-shell-exit-on-n.patch
 selftests-bpf-test_progs-avoid-minus-shell-exit-code.patch
 usb-serial-ftdi_sio-make-process-packet-buffer-unsig.patch
 usb-serial-ftdi_sio-clean-up-receive-processing.patch
-usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
 crypto-af_alg-fix-regression-on-empty-requests.patch
 devres-keep-both-device-name-and-resource-name-in-pr.patch
 rdma-counter-only-bind-user-qps-in-auto-mode.patch
diff --git a/queue-5.7/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch b/queue-5.7/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
deleted file mode 100644 (file)
index 49130a1..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-From 70bea4040a2eb671e733d5845c1dfb8b48b560f4 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jul 2020 14:49:53 +0200
-Subject: USB: serial: ftdi_sio: fix break and sysrq handling
-
-From: Johan Hovold <johan@kernel.org>
-
-[ Upstream commit 733fff67941dad64b8a630450b8372b1873edc41 ]
-
-Only the last NUL in a packet should be flagged as a break character,
-for example, to avoid dropping unrelated characters when IGNBRK is set.
-
-Also make sysrq work by consuming the break character instead of having
-it immediately cancel the sysrq request, and by not processing it
-prematurely to avoid triggering a sysrq based on an unrelated character
-received in the same packet (which was received *before* the break).
-
-Note that the break flag can be left set also for a packet received
-immediately following a break and that and an ending NUL in such a
-packet will continue to be reported as a break as there's no good way to
-tell it apart from an actual break.
-
-Tested on FT232R and FT232H.
-
-Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break")
-Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
-Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/serial/ftdi_sio.c | 24 +++++++++++++++++-------
- 1 file changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
-index 33f1cca7eaa61..07b146d7033a6 100644
---- a/drivers/usb/serial/ftdi_sio.c
-+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -2483,6 +2483,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-               struct ftdi_private *priv, unsigned char *buf, int len)
- {
-       unsigned char status;
-+      bool brkint = false;
-       int i;
-       char flag;
-@@ -2534,13 +2535,17 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-        */
-       flag = TTY_NORMAL;
-       if (buf[1] & FTDI_RS_ERR_MASK) {
--              /* Break takes precedence over parity, which takes precedence
--               * over framing errors */
--              if (buf[1] & FTDI_RS_BI) {
--                      flag = TTY_BREAK;
-+              /*
-+               * Break takes precedence over parity, which takes precedence
-+               * over framing errors. Note that break is only associated
-+               * with the last character in the buffer and only when it's a
-+               * NUL.
-+               */
-+              if (buf[1] & FTDI_RS_BI && buf[len - 1] == '\0') {
-                       port->icount.brk++;
--                      usb_serial_handle_break(port);
--              } else if (buf[1] & FTDI_RS_PE) {
-+                      brkint = true;
-+              }
-+              if (buf[1] & FTDI_RS_PE) {
-                       flag = TTY_PARITY;
-                       port->icount.parity++;
-               } else if (buf[1] & FTDI_RS_FE) {
-@@ -2556,8 +2561,13 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-       port->icount.rx += len - 2;
--      if (port->port.console && port->sysrq) {
-+      if (brkint || (port->port.console && port->sysrq)) {
-               for (i = 2; i < len; i++) {
-+                      if (brkint && i == len - 1) {
-+                              if (usb_serial_handle_break(port))
-+                                      return len - 3;
-+                              flag = TTY_BREAK;
-+                      }
-                       if (usb_serial_handle_sysrq_char(port, buf[i]))
-                               continue;
-                       tty_insert_flip_char(&port->port, buf[i], flag);
--- 
-2.25.1
-
index 5af74966cec8f4282738ceba74f484db45efe30c..63270e3486414e0971bfe9fbd6486d21dcf36387 100644 (file)
@@ -134,7 +134,6 @@ selftests-bpf-test_progs-use-another-shell-exit-on-n.patch
 selftests-bpf-test_progs-avoid-minus-shell-exit-code.patch
 usb-serial-ftdi_sio-make-process-packet-buffer-unsig.patch
 usb-serial-ftdi_sio-clean-up-receive-processing.patch
-usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
 crypto-af_alg-fix-regression-on-empty-requests.patch
 devres-keep-both-device-name-and-resource-name-in-pr.patch
 rdma-counter-only-bind-user-qps-in-auto-mode.patch
diff --git a/queue-5.8/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch b/queue-5.8/usb-serial-ftdi_sio-fix-break-and-sysrq-handling.patch
deleted file mode 100644 (file)
index 70c6213..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-From e0dbb32fa6b83068ebad42e7fd4a4bf6a7d894d3 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 8 Jul 2020 14:49:53 +0200
-Subject: USB: serial: ftdi_sio: fix break and sysrq handling
-
-From: Johan Hovold <johan@kernel.org>
-
-[ Upstream commit 733fff67941dad64b8a630450b8372b1873edc41 ]
-
-Only the last NUL in a packet should be flagged as a break character,
-for example, to avoid dropping unrelated characters when IGNBRK is set.
-
-Also make sysrq work by consuming the break character instead of having
-it immediately cancel the sysrq request, and by not processing it
-prematurely to avoid triggering a sysrq based on an unrelated character
-received in the same packet (which was received *before* the break).
-
-Note that the break flag can be left set also for a packet received
-immediately following a break and that and an ending NUL in such a
-packet will continue to be reported as a break as there's no good way to
-tell it apart from an actual break.
-
-Tested on FT232R and FT232H.
-
-Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break")
-Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
-Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Signed-off-by: Johan Hovold <johan@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/usb/serial/ftdi_sio.c | 24 +++++++++++++++++-------
- 1 file changed, 17 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
-index 33f1cca7eaa61..07b146d7033a6 100644
---- a/drivers/usb/serial/ftdi_sio.c
-+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -2483,6 +2483,7 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-               struct ftdi_private *priv, unsigned char *buf, int len)
- {
-       unsigned char status;
-+      bool brkint = false;
-       int i;
-       char flag;
-@@ -2534,13 +2535,17 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-        */
-       flag = TTY_NORMAL;
-       if (buf[1] & FTDI_RS_ERR_MASK) {
--              /* Break takes precedence over parity, which takes precedence
--               * over framing errors */
--              if (buf[1] & FTDI_RS_BI) {
--                      flag = TTY_BREAK;
-+              /*
-+               * Break takes precedence over parity, which takes precedence
-+               * over framing errors. Note that break is only associated
-+               * with the last character in the buffer and only when it's a
-+               * NUL.
-+               */
-+              if (buf[1] & FTDI_RS_BI && buf[len - 1] == '\0') {
-                       port->icount.brk++;
--                      usb_serial_handle_break(port);
--              } else if (buf[1] & FTDI_RS_PE) {
-+                      brkint = true;
-+              }
-+              if (buf[1] & FTDI_RS_PE) {
-                       flag = TTY_PARITY;
-                       port->icount.parity++;
-               } else if (buf[1] & FTDI_RS_FE) {
-@@ -2556,8 +2561,13 @@ static int ftdi_process_packet(struct usb_serial_port *port,
-       port->icount.rx += len - 2;
--      if (port->port.console && port->sysrq) {
-+      if (brkint || (port->port.console && port->sysrq)) {
-               for (i = 2; i < len; i++) {
-+                      if (brkint && i == len - 1) {
-+                              if (usb_serial_handle_break(port))
-+                                      return len - 3;
-+                              flag = TTY_BREAK;
-+                      }
-                       if (usb_serial_handle_sysrq_char(port, buf[i]))
-                               continue;
-                       tty_insert_flip_char(&port->port, buf[i], flag);
--- 
-2.25.1
-