Patch "extcon: usbc-tusb320: Call the Type-C IRQ handler only if a port is registered" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    extcon: usbc-tusb320: Call the Type-C IRQ handler only if a port is registered

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     extcon-usbc-tusb320-call-the-type-c-irq-handler-only-if-a-port-is-registered.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 341fd15e2e18c24d5c738496cfc3d7a272241201 Mon Sep 17 00:00:00 2001
From: Yassine Oudjana <y.oudjana@xxxxxxxxxxxxxx>
Date: Mon, 7 Nov 2022 18:33:17 +0300
Subject: extcon: usbc-tusb320: Call the Type-C IRQ handler only if a port is registered

From: Yassine Oudjana <y.oudjana@xxxxxxxxxxxxxx>

commit 341fd15e2e18c24d5c738496cfc3d7a272241201 upstream.

Commit bf7571c00dca ("extcon: usbc-tusb320: Add USB TYPE-C support")
added an optional Type-C interface to the driver but missed to check
if it is in use when calling the IRQ handler. This causes an oops on
devices currently using the old extcon interface. Check if a Type-C
port is registered before calling the Type-C IRQ handler.

Fixes: bf7571c00dca ("extcon: usbc-tusb320: Add USB TYPE-C support")
Signed-off-by: Yassine Oudjana <y.oudjana@xxxxxxxxxxxxxx>
Reviewed-by: Marek Vasut <marex@xxxxxxx>
Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20221107153317.657803-1-y.oudjana@xxxxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/extcon/extcon-usbc-tusb320.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/drivers/extcon/extcon-usbc-tusb320.c
+++ b/drivers/extcon/extcon-usbc-tusb320.c
@@ -327,7 +327,13 @@ static irqreturn_t tusb320_state_update_
 		return IRQ_NONE;
 
 	tusb320_extcon_irq_handler(priv, reg);
-	tusb320_typec_irq_handler(priv, reg);
+
+	/*
+	 * Type-C support is optional. Only call the Type-C handler if a
+	 * port had been registered previously.
+	 */
+	if (priv->port)
+		tusb320_typec_irq_handler(priv, reg);
 
 	regmap_write(priv->regmap, TUSB320_REG9, reg);
 


Patches currently in stable-queue which might be from y.oudjana@xxxxxxxxxxxxxx are

queue-5.15/extcon-usbc-tusb320-add-support-for-tusb320l.patch
queue-5.15/arm64-dts-qcom-msm8996-add-msm8996-pro-support.patch
queue-5.15/extcon-usbc-tusb320-add-support-for-mode-setting-and.patch
queue-5.15/extcon-usbc-tusb320-call-the-type-c-irq-handler-only-if-a-port-is-registered.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux