Linux USB
 help / color / mirror / Atom feed
* [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown
@ 2026-11-25 11:04 Neil Armstrong
  2026-11-25 11:04 ` [PATCH v2 1/4] usb: typec: qcom-pmic-typec: pdphy: disable the PD PHY on stop Neil Armstrong
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Neil Armstrong @ 2026-11-25 11:04 UTC (permalink / raw)
  To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Guenter Roeck, Casey Connolly
  Cc: linux-arm-msm, linux-usb, Neil Armstrong

The current driver doesn't leave the port in the same
state as found when probing, and leaves the port enabled
on system shutdown.

Loosely depends on [1].

[1] https://lore.kernel.org/all/20261125-topic-tcpm-core-fixes-v2-0-aede2a3471f4@linaro.org/

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v2:
- Add Fixes and review tags
- Also disable on remove
- New patch: switch to SNK_ONLY before DISABLE when disabling port
- New patch: detach the port on probe
- Link to v1: https://patch.msgid.link/20261120-topic-tcpm-qcom-fixes-v1-0-9a152f906fba@linaro.org

To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Guenter Roeck <linux@roeck-us.net>
To: Casey Connolly <casey.connolly@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-usb@vger.kernel.org

---
Neil Armstrong (4):
      usb: typec: qcom-pmic-typec: pdphy: disable the PD PHY on stop
      usb: typec: qcom-pmic-typec: detach the port on shutdown
      usb: typec: qcom-pmic-typec: switch to SNK_ONLY before DISABLE when disabling port
      usb: typec: qcom-pmic-typec: detach the port on probe

 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c      | 12 ++++++++
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.h      |  1 +
 .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c    |  2 +-
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 32 ++++++++++++++++++++++
 4 files changed, 46 insertions(+), 1 deletion(-)
---
base-commit: 3dd8c790a7b7027abdd568e36db5e82ffaea7c77
change-id: 20261120-topic-tcpm-qcom-fixes-c9ce1e65c570

Best regards,
--  
Neil Armstrong <neil.armstrong@linaro.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/4] usb: typec: qcom-pmic-typec: pdphy: disable the PD PHY on stop
  2026-11-25 11:04 [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown Neil Armstrong
@ 2026-11-25 11:04 ` Neil Armstrong
  2026-11-25 11:04 ` [PATCH v2 2/4] usb: typec: qcom-pmic-typec: detach the port on shutdown Neil Armstrong
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2026-11-25 11:04 UTC (permalink / raw)
  To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Guenter Roeck, Casey Connolly
  Cc: linux-arm-msm, linux-usb, Neil Armstrong

qcom_pmic_typec_pdphy_stop() only terminates the ongoing transmission and
clears the RX frame filter, the PD PHY itself stays enabled.

Use qcom_pmic_typec_pdphy_disable() so the PD PHY is also turned off
before its supply is released, leaving it in the same state as before
qcom_pmic_typec_pdphy_start().

Assisted-by: LLM
Fixes: a4422ff22142 ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
index 435e07659d65..08cf65951796 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
@@ -545,7 +545,7 @@ static void qcom_pmic_typec_pdphy_stop(struct pmic_typec *tcpm)
 
 	cancel_work_sync(&pmic_typec_pdphy->reset_work);
 
-	qcom_pmic_typec_pdphy_reset_on(pmic_typec_pdphy);
+	qcom_pmic_typec_pdphy_disable(pmic_typec_pdphy);
 
 	regulator_disable(pmic_typec_pdphy->vdd_pdphy);
 }

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/4] usb: typec: qcom-pmic-typec: detach the port on shutdown
  2026-11-25 11:04 [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown Neil Armstrong
  2026-11-25 11:04 ` [PATCH v2 1/4] usb: typec: qcom-pmic-typec: pdphy: disable the PD PHY on stop Neil Armstrong
@ 2026-11-25 11:04 ` Neil Armstrong
  2026-11-25 11:18   ` sashiko-bot
  2026-11-25 11:04 ` [PATCH v2 3/4] usb: typec: qcom-pmic-typec: switch to SNK_ONLY before DISABLE when disabling port Neil Armstrong
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Neil Armstrong @ 2026-11-25 11:04 UTC (permalink / raw)
  To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Guenter Roeck, Casey Connolly
  Cc: linux-arm-msm, linux-usb, Neil Armstrong

On reboot or power off the port is left as is: a source partner keeps
the negotiated contract, possibly above 5V, and a sink partner stays
powered by the OTG boost while nothing services the port anymore.

Add a shutdown callback stopping the port and the PD PHY, unregistering
the TCPM port, which turns VBUS and VCONN off, and finally disabling the
Type-C block so the partner sees a detach. Also disable on remove.

Assisted-by: LLM
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c      | 12 ++++++++++++
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.h      |  1 +
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 11 +++++++++++
 3 files changed, 24 insertions(+)

diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
index 58d1e6aae637..be7508936796 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
@@ -132,6 +132,17 @@ static void qcom_pmic_typec_remove(struct platform_device *pdev)
 	tcpm->port_stop(tcpm);
 	tcpm_unregister_port(tcpm->tcpm_port);
 	fwnode_handle_put(tcpm->tcpc.fwnode);
+	tcpm->port_disable(tcpm);
+}
+
+static void qcom_pmic_typec_shutdown(struct platform_device *pdev)
+{
+	struct pmic_typec *tcpm = platform_get_drvdata(pdev);
+
+	tcpm->pdphy_stop(tcpm);
+	tcpm->port_stop(tcpm);
+	tcpm_unregister_port(tcpm->tcpm_port);
+	tcpm->port_disable(tcpm);
 }
 
 static const struct pmic_typec_resources pm8150b_typec_res = {
@@ -158,6 +169,7 @@ static struct platform_driver qcom_pmic_typec_driver = {
 	},
 	.probe = qcom_pmic_typec_probe,
 	.remove = qcom_pmic_typec_remove,
+	.shutdown = qcom_pmic_typec_shutdown,
 };
 
 module_platform_driver(qcom_pmic_typec_driver);
diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.h b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.h
index 3c75820c9187..0818582fe850 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.h
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.h
@@ -20,6 +20,7 @@ struct pmic_typec {
 	int (*port_start)(struct pmic_typec *tcpm,
 			  struct tcpm_port *tcpm_port);
 	void (*port_stop)(struct pmic_typec *tcpm);
+	void (*port_disable)(struct pmic_typec *tcpm);
 };
 
 #define tcpc_to_tcpm(_tcpc_) container_of(_tcpc_, struct pmic_typec, tcpc)
diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
index d433fc3e7e56..710acdb9689b 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
@@ -701,6 +701,16 @@ static void qcom_pmic_typec_port_stop(struct pmic_typec *tcpm)
 	disable_delayed_work_sync(&pmic_typec_port->cc_debounce_dwork);
 }
 
+static void qcom_pmic_typec_port_disable(struct pmic_typec *tcpm)
+{
+	struct pmic_typec_port *pmic_typec_port = tcpm->pmic_typec_port;
+
+	/* Present neither Rp nor Rd, so a connected partner detects a detach */
+	regmap_write(pmic_typec_port->regmap,
+		     pmic_typec_port->base + TYPEC_MODE_CFG_REG,
+		     TYPEC_DISABLE_CMD);
+}
+
 int qcom_pmic_typec_port_probe(struct platform_device *pdev,
 			       struct pmic_typec *tcpm,
 			       const struct pmic_typec_port_resources *res,
@@ -781,6 +791,7 @@ int qcom_pmic_typec_port_probe(struct platform_device *pdev,
 
 	tcpm->port_start = qcom_pmic_typec_port_start;
 	tcpm->port_stop = qcom_pmic_typec_port_stop;
+	tcpm->port_disable = qcom_pmic_typec_port_disable;
 
 	return 0;
 }

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 3/4] usb: typec: qcom-pmic-typec: switch to SNK_ONLY before DISABLE when disabling port
  2026-11-25 11:04 [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown Neil Armstrong
  2026-11-25 11:04 ` [PATCH v2 1/4] usb: typec: qcom-pmic-typec: pdphy: disable the PD PHY on stop Neil Armstrong
  2026-11-25 11:04 ` [PATCH v2 2/4] usb: typec: qcom-pmic-typec: detach the port on shutdown Neil Armstrong
@ 2026-11-25 11:04 ` Neil Armstrong
  2026-11-25 11:04 ` [PATCH v2 4/4] usb: typec: qcom-pmic-typec: detach the port on probe Neil Armstrong
  2026-11-25 11:18 ` [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown sashiko-bot
  4 siblings, 0 replies; 8+ messages in thread
From: Neil Armstrong @ 2026-11-25 11:04 UTC (permalink / raw)
  To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Guenter Roeck, Casey Connolly
  Cc: linux-arm-msm, linux-usb, Neil Armstrong

Disabling it straight from DRP mode can trigger an over-voltage fault on
the VBUS boost, so switch it first to sink only mode for 2ms, then present
neither Rp nor Rd, so a connected partner detects a detach in a safe way.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
index 710acdb9689b..f125ac722e8b 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
@@ -705,6 +705,16 @@ static void qcom_pmic_typec_port_disable(struct pmic_typec *tcpm)
 {
 	struct pmic_typec_port *pmic_typec_port = tcpm->pmic_typec_port;
 
+	/*
+	 * Disabling the Type-C block straight from DRP mode can trigger
+	 * a VBUS boost over-voltage fault, so go through sink only mode first.
+	 */
+	regmap_write(pmic_typec_port->regmap,
+		     pmic_typec_port->base + TYPEC_MODE_CFG_REG,
+		     EN_SNK_ONLY);
+
+	usleep_range(2000, 3000);
+
 	/* Present neither Rp nor Rd, so a connected partner detects a detach */
 	regmap_write(pmic_typec_port->regmap,
 		     pmic_typec_port->base + TYPEC_MODE_CFG_REG,

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 4/4] usb: typec: qcom-pmic-typec: detach the port on probe
  2026-11-25 11:04 [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown Neil Armstrong
                   ` (2 preceding siblings ...)
  2026-11-25 11:04 ` [PATCH v2 3/4] usb: typec: qcom-pmic-typec: switch to SNK_ONLY before DISABLE when disabling port Neil Armstrong
@ 2026-11-25 11:04 ` Neil Armstrong
  2026-11-25 11:13   ` sashiko-bot
  2026-11-25 11:18 ` [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown sashiko-bot
  4 siblings, 1 reply; 8+ messages in thread
From: Neil Armstrong @ 2026-11-25 11:04 UTC (permalink / raw)
  To: Bryan O'Donoghue, Heikki Krogerus, Greg Kroah-Hartman,
	Guenter Roeck, Casey Connolly
  Cc: linux-arm-msm, linux-usb, Neil Armstrong

The Type-C block may have been left attached by the bootloader, force a
detach longer than tPDDebounce so the partner and TCPM start from a known
state.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
index f125ac722e8b..a33903fedfb7 100644
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
@@ -803,6 +803,17 @@ int qcom_pmic_typec_port_probe(struct platform_device *pdev,
 	tcpm->port_stop = qcom_pmic_typec_port_stop;
 	tcpm->port_disable = qcom_pmic_typec_port_disable;
 
+	/*
+	 * The Type-C block may have been left attached by the bootloader,
+	 * force a detach longer than tPDDebounce so the partner and TCPM
+	 * start from a known state.
+	 */
+	regmap_write(pmic_typec_port->regmap,
+		     pmic_typec_port->base + TYPEC_MODE_CFG_REG,
+		     TYPEC_DISABLE_CMD);
+
+	msleep(200);
+
 	return 0;
 }
 

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 4/4] usb: typec: qcom-pmic-typec: detach the port on probe
  2026-11-25 11:04 ` [PATCH v2 4/4] usb: typec: qcom-pmic-typec: detach the port on probe Neil Armstrong
@ 2026-11-25 11:13   ` sashiko-bot
  0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-11-25 11:13 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: linux-usb

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] usb: typec: qcom-pmic-typec: unsafe disable in
  qcom_pmic_typec_port_probe()
--

commit 3a740bf28aab0b4c112846a62403e5fa9d63a6b5
Author: Neil Armstrong <neil.armstrong@linaro.org>

usb: typec: qcom-pmic-typec: detach the port on probe

This commit disables the Type-C block and sleeps for 200 ms during probe
to force a detach if the port was left attached by the bootloader.

> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
> index f125ac722e8b8..a33903fedfb7d 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c
> @@ -803,6 +803,17 @@ int qcom_pmic_typec_port_probe(struct platform_device *pdev,
>  	tcpm->port_stop = qcom_pmic_typec_port_stop;
>  	tcpm->port_disable = qcom_pmic_typec_port_disable;
>  
> +	/*
> +	 * The Type-C block may have been left attached by the bootloader,
> +	 * force a detach longer than tPDDebounce so the partner and TCPM
> +	 * start from a known state.
> +	 */
> +	regmap_write(pmic_typec_port->regmap,
> +		     pmic_typec_port->base + TYPEC_MODE_CFG_REG,
> +		     TYPEC_DISABLE_CMD);
> +
> +	msleep(200);
> +
>  	return 0;
>  }

[Severity: Medium]
Should this call qcom_pmic_typec_port_disable(tcpm) instead of writing
TYPEC_DISABLE_CMD directly to TYPEC_MODE_CFG_REG?

As noted in qcom_pmic_typec_port_disable() right above, disabling the
Type-C block straight from DRP mode can trigger a VBUS boost over-voltage
fault unless it transitions through EN_SNK_ONLY first:

drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c:qcom_pmic_typec_port_disable() {
	/*
	 * Disabling the Type-C block straight from DRP mode can trigger
	 * a VBUS boost over-voltage fault, so go through sink only mode first.
	 */
	regmap_write(pmic_typec_port->regmap,
		     pmic_typec_port->base + TYPEC_MODE_CFG_REG,
		     EN_SNK_ONLY);

	usleep_range(2000, 3000);

	/* Present neither Rp nor Rd, so a connected partner detects a detach */
	regmap_write(pmic_typec_port->regmap,
		     pmic_typec_port->base + TYPEC_MODE_CFG_REG,
		     TYPEC_DISABLE_CMD);
}

If the bootloader left the Type-C block in DRP mode, writing
TYPEC_DISABLE_CMD directly during probe can trigger that over-voltage
fault.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125-topic-tcpm-qcom-fixes-v2-0-6fede9a69f6f@linaro.org?part=4

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/4] usb: typec: qcom-pmic-typec: detach the port on shutdown
  2026-11-25 11:04 ` [PATCH v2 2/4] usb: typec: qcom-pmic-typec: detach the port on shutdown Neil Armstrong
@ 2026-11-25 11:18   ` sashiko-bot
  0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-11-25 11:18 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: linux-usb

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] usb: typec: qcom: NULL deref in tcpm_vbus_change() on shutdown
  with VBUS on
- [Medium] usb: typec: qcom: missing port_disable() on
  qcom_pmic_typec_probe() error path
--

commit 274682eb5898a80edc0745dc8284b7d6afe1aba6
Author: Neil Armstrong <neil.armstrong@linaro.org>

usb: typec: qcom-pmic-typec: detach the port on shutdown

This commit adds a platform driver shutdown callback that stops the PD PHY
and Type-C port, unregisters the TCPM port, and disables the Type-C block,
and also calls port_disable() on driver removal.

> diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> index 58d1e6aae637d..be7508936796e 100644
> --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
> @@ -132,6 +132,17 @@ static void qcom_pmic_typec_remove(struct platform_device *pdev)
>  	tcpm->port_stop(tcpm);
>  	tcpm_unregister_port(tcpm->tcpm_port);
>  	fwnode_handle_put(tcpm->tcpc.fwnode);
> +	tcpm->port_disable(tcpm);
> +}

[Severity: Medium]
Should the error unwind path in qcom_pmic_typec_probe() also call
tcpm->port_disable(tcpm)?

tcpm_register_port() (via qcom_pmic_typec_port_start_toggling()) and
tcpm->port_start() write an active role mode to TYPEC_MODE_CFG_REG.  If a
later step in qcom_pmic_typec_probe() such as tcpm->pdphy_start() or
devm_drm_dp_hpd_bridge_add() fails, the error path unregisters the port
without disabling it, leaving Rp or Rd presented on CC with no driver bound.

> +
> +static void qcom_pmic_typec_shutdown(struct platform_device *pdev)
> +{
> +	struct pmic_typec *tcpm = platform_get_drvdata(pdev);
> +
> +	tcpm->pdphy_stop(tcpm);
> +	tcpm->port_stop(tcpm);
> +	tcpm_unregister_port(tcpm->tcpm_port);
> +	tcpm->port_disable(tcpm);
>  }

[Severity: High]
Can calling tcpm_unregister_port() here cause a NULL pointer dereference in
tcpm_vbus_change() when shutting down with an attached sink partner?

tcpm_unregister_port() destroys port->wq and sets port->wq = NULL before
calling tcpm_reset_port() -> tcpm_init_vbus() ->
qcom_pmic_typec_port_set_vbus(..., false, false).  When VBUS was enabled,
qcom_pmic_typec_port_set_vbus() turns the regulator off and notifies TCPM:

drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c:qcom_pmic_typec_port_set_vbus() {
	...
	ret = qcom_pmic_typec_port_vbus_toggle(pmic_typec_port, on);
	if (ret)
		goto done;

	pmic_typec_port->vbus_enabled = on;
	tcpm_vbus_change(tcpm->tcpm_port);
	...
}

tcpm_vbus_change() then calls kthread_queue_work(port->wq, &port->event_work)
with port->wq == NULL, crashing in raw_spin_lock_irqsave(&worker->lock)
before tcpm->port_disable(tcpm) is reached.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125-topic-tcpm-qcom-fixes-v2-0-6fede9a69f6f@linaro.org?part=2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown
  2026-11-25 11:04 [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown Neil Armstrong
                   ` (3 preceding siblings ...)
  2026-11-25 11:04 ` [PATCH v2 4/4] usb: typec: qcom-pmic-typec: detach the port on probe Neil Armstrong
@ 2026-11-25 11:18 ` sashiko-bot
  4 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-11-25 11:18 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: linux-usb

Sashiko has finished reviewing this 4-patch series:

- Patches 1 and 3: no issues found.
- Patch 2 ("usb: typec: qcom-pmic-typec: detach the port on shut..."): 2
  potential issues (1 High, 1 Medium)
- Patch 4 ("usb: typec: qcom-pmic-typec: detach the port on probe"): 1
  potential issue (1 Medium)

Detailed reviews have been sent as separate replies to patches 2 and 4.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125-topic-tcpm-qcom-fixes-v2-0-6fede9a69f6f@linaro.org

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-25 11:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 11:04 [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown Neil Armstrong
2026-11-25 11:04 ` [PATCH v2 1/4] usb: typec: qcom-pmic-typec: pdphy: disable the PD PHY on stop Neil Armstrong
2026-11-25 11:04 ` [PATCH v2 2/4] usb: typec: qcom-pmic-typec: detach the port on shutdown Neil Armstrong
2026-11-25 11:18   ` sashiko-bot
2026-11-25 11:04 ` [PATCH v2 3/4] usb: typec: qcom-pmic-typec: switch to SNK_ONLY before DISABLE when disabling port Neil Armstrong
2026-11-25 11:04 ` [PATCH v2 4/4] usb: typec: qcom-pmic-typec: detach the port on probe Neil Armstrong
2026-11-25 11:13   ` sashiko-bot
2026-11-25 11:18 ` [PATCH v2 0/4] usb: typec: qcom-pmic-typec: properly tear down port on remove and shutdown sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox