From: Greg Kroah-Hartman Date: Mon, 28 Feb 2022 07:05:34 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v4.9.304~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01d5f21bfb9b2b5d112915e68e28e8486489648e;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: tps6598x-clear-int-mask-on-probe-failure.patch tty-n_gsm-fix-encoding-of-control-signal-octet-bit-dv.patch --- diff --git a/queue-5.4/series b/queue-5.4/series index 57f97e3a72e..ab0848633f0 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -45,3 +45,5 @@ 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 +tps6598x-clear-int-mask-on-probe-failure.patch diff --git a/queue-5.4/tps6598x-clear-int-mask-on-probe-failure.patch b/queue-5.4/tps6598x-clear-int-mask-on-probe-failure.patch new file mode 100644 index 00000000000..e63dd5c2975 --- /dev/null +++ b/queue-5.4/tps6598x-clear-int-mask-on-probe-failure.patch @@ -0,0 +1,59 @@ +From aba2081e0a9c977396124aa6df93b55ed5912b19 Mon Sep 17 00:00:00 2001 +From: Jens Axboe +Date: Tue, 15 Feb 2022 11:22:04 -0700 +Subject: tps6598x: clear int mask on probe failure + +From: Jens Axboe + +commit aba2081e0a9c977396124aa6df93b55ed5912b19 upstream. + +The interrupt mask is enabled before any potential failure points in +the driver, which can leave a failure path where we exit with +interrupts enabled but the device not live. This causes an infinite +stream of interrupts on an Apple M1 Pro laptop on USB-C. + +Add a failure label that's used post enabling interrupts, where we +mask them again before returning an error. + +Suggested-by: Sven Peter +Cc: stable +Reviewed-by: Heikki Krogerus +Signed-off-by: Jens Axboe +Link: https://lore.kernel.org/r/e6b80669-20f3-06e7-9ed5-8951a9c6db6f@kernel.dk +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/typec/tipd/core.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c +index 6d27a5b5e3ca..7ffcda94d323 100644 +--- a/drivers/usb/typec/tipd/core.c ++++ b/drivers/usb/typec/tipd/core.c +@@ -761,12 +761,12 @@ static int tps6598x_probe(struct i2c_client *client) + + ret = tps6598x_read32(tps, TPS_REG_STATUS, &status); + if (ret < 0) +- return ret; ++ goto err_clear_mask; + trace_tps6598x_status(status); + + ret = tps6598x_read32(tps, TPS_REG_SYSTEM_CONF, &conf); + if (ret < 0) +- return ret; ++ goto err_clear_mask; + + /* + * This fwnode has a "compatible" property, but is never populated as a +@@ -855,7 +855,8 @@ static int tps6598x_probe(struct i2c_client *client) + usb_role_switch_put(tps->role_sw); + err_fwnode_put: + fwnode_handle_put(fwnode); +- ++err_clear_mask: ++ tps6598x_write64(tps, TPS_REG_INT_MASK1, 0); + return ret; + } + +-- +2.35.1 + diff --git a/queue-5.4/tty-n_gsm-fix-encoding-of-control-signal-octet-bit-dv.patch b/queue-5.4/tty-n_gsm-fix-encoding-of-control-signal-octet-bit-dv.patch new file mode 100644 index 00000000000..809b4f7ed2b --- /dev/null +++ b/queue-5.4/tty-n_gsm-fix-encoding-of-control-signal-octet-bit-dv.patch @@ -0,0 +1,44 @@ +From 737b0ef3be6b319d6c1fd64193d1603311969326 Mon Sep 17 00:00:00 2001 +From: "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 + +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 +Link: https://lore.kernel.org/r/20220218073123.2121-1-daniel.starke@siemens.com +Signed-off-by: Greg Kroah-Hartman +--- + 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; + }