]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Feb 2022 07:05:31 +0000 (08:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Feb 2022 07:05:31 +0000 (08:05 +0100)
added patches:
tty-n_gsm-fix-encoding-of-control-signal-octet-bit-dv.patch

queue-4.19/series
queue-4.19/tty-n_gsm-fix-encoding-of-control-signal-octet-bit-dv.patch [new file with mode: 0644]

index 2c4b65575d21f2e5d00125d801beb1c36a21835b..91090ebd948c83e8a8ecffaac7319458dd330579 100644 (file)
@@ -27,3 +27,4 @@ usb-dwc3-pci-fix-bay-trail-phy-gpio-mappings.patch
 usb-dwc3-gadget-let-the-interrupt-handler-disable-bottom-halves.patch
 xhci-re-initialize-the-hc-during-resume-if-hce-was-set.patch
 xhci-prevent-futile-urb-re-submissions-due-to-incorrect-return-value.patch
+tty-n_gsm-fix-encoding-of-control-signal-octet-bit-dv.patch
diff --git a/queue-4.19/tty-n_gsm-fix-encoding-of-control-signal-octet-bit-dv.patch b/queue-4.19/tty-n_gsm-fix-encoding-of-control-signal-octet-bit-dv.patch
new file mode 100644 (file)
index 0000000..809b4f7
--- /dev/null
@@ -0,0 +1,44 @@
+From 737b0ef3be6b319d6c1fd64193d1603311969326 Mon Sep 17 00:00:00 2001
+From: "daniel.starke@siemens.com" <daniel.starke@siemens.com>
+Date: Thu, 17 Feb 2022 23:31:17 -0800
+Subject: tty: n_gsm: fix encoding of control signal octet bit DV
+
+From: daniel.starke@siemens.com <daniel.starke@siemens.com>
+
+commit 737b0ef3be6b319d6c1fd64193d1603311969326 upstream.
+
+n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010.
+See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516
+The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to
+the newer 27.010 here. Chapter 5.4.6.3.7 describes the encoding of the
+control signal octet used by the MSC (modem status command). The same
+encoding is also used in convergence layer type 2 as described in chapter
+5.5.2. Table 7 and 24 both require the DV (data valid) bit to be set 1 for
+outgoing control signal octets sent by the DTE (data terminal equipment),
+i.e. for the initiator side.
+Currently, the DV bit is only set if CD (carrier detect) is on, regardless
+of the side.
+
+This patch fixes this behavior by setting the DV bit on the initiator side
+unconditionally.
+
+Fixes: e1eaea46bb40 ("tty: n_gsm line discipline")
+Cc: stable@vger.kernel.org
+Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
+Link: https://lore.kernel.org/r/20220218073123.2121-1-daniel.starke@siemens.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/n_gsm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/tty/n_gsm.c
++++ b/drivers/tty/n_gsm.c
+@@ -428,7 +428,7 @@ static u8 gsm_encode_modem(const struct
+               modembits |= MDM_RTR;
+       if (dlci->modem_tx & TIOCM_RI)
+               modembits |= MDM_IC;
+-      if (dlci->modem_tx & TIOCM_CD)
++      if (dlci->modem_tx & TIOCM_CD || dlci->gsm->initiator)
+               modembits |= MDM_DV;
+       return modembits;
+ }