FAILED: patch "[PATCH] usb: typec: tcpci: clear the fault status bit" failed to apply to 5.10-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 23e60c8daf5ec2ab1b731310761b668745fcf6ed
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023090315-composure-handbook-a344@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
23e60c8daf5e ("usb: typec: tcpci: clear the fault status bit")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 23e60c8daf5ec2ab1b731310761b668745fcf6ed Mon Sep 17 00:00:00 2001
From: Marco Felsch <[email protected]>
Date: Wed, 16 Aug 2023 14:25:02 -0300
Subject: [PATCH] usb: typec: tcpci: clear the fault status bit
According the "USB Type-C Port Controller Interface Specification v2.0" the TCPC sets the fault status register bit-7 (AllRegistersResetToDefault) once the registers have been reset to their default values.
This triggers an alert(-irq) on PTN5110 devices albeit we do mask the fault-irq, which may cause a kernel hang. Fix this generically by writing a one to the corresponding bit-7.
drivers/usb/typec/tcpm/tcpci.c +4 -0
@@ -602,6 +602,10 @@ static int tcpci_init(struct tcpc_dev *tcpc)if (time_after (jiffies, timeout))return -ETIMEDOUT ; + ret =tcpci_write16 (tcpci,TCPC_FAULT_STATUS ,TCPC_FAULT_STATUS_ALL_REG_RST_TO_DEFAULT ); +if (ret <0 ) +return ret; +/* Handle vendor init */ if (tcpci->data->init) { ret = tcpci->data->init (tcpci, tcpci->data);
include/linux/usb/tcpci.h +1 -0
@@ -103,6 +103,7 @@#define TCPC_POWER_STATUS_SINKING_VBUS BIT(0)#define TCPC_FAULT_STATUS 0x1f +#define TCPC_FAULT_STATUS_ALL_REG_RST_TO_DEFAULT BIT(7)#define TCPC_ALERT_EXTENDED 0x21