* [PATCH] usb: typec: tcpm: fix missed frs_sourcing_vbus() call during FRS
@ 2026-11-22 10:28 Max Andreev
2026-11-22 10:38 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Max Andreev @ 2026-11-22 10:28 UTC (permalink / raw)
To: Badhri Jagan Sridharan, Heikki Krogerus, Greg Kroah-Hartman,
Kyle Tso
Cc: Max Andreev, stable, linux-usb, linux-kernel
Since commit 0908c5aca31e ("usb: typec: tcpm: AMS and Collision
Avoidance") the TCPC reports sourcing vbus while the port is still in
AMS_START with FR_SWAP_SEND as the upcoming state. Because of
_tcpm_pd_vbus_on() ignores this state, frs_sourcing_vbus() is never called
during FRS.
On Pixel 11 Pro XL after an FRS from sink to source the phone keeps
showing the charging indicator, and about 20 seconds later VBUS drops
and the attached device reboots.
Call frs_sourcing_vbus() from AMS_START when the upcoming state is
FR_SWAP_SEND.
---
I'm not test theese changes on mainline, but tested on Pixel 11 Pro XL
vendor kernel 6.1 with the same _tcpm_pd_vbus_on() code, as i see
mainline tcpm.c is identical in this area.
Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance")
Cc: stable@vger.kernel.org
Signed-off-by: Max Andreev <drunkbatya.js@gmail.com>
---
drivers/usb/typec/tcpm/tcpm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 51e5c72799f2..5caa649a92f1 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -6889,6 +6889,11 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port)
port->tcpc->frs_sourcing_vbus(port->tcpc);
tcpm_set_state(port, FR_SWAP_SNK_SRC_SOURCE_VBUS_APPLIED, 0);
break;
+ case AMS_START:
+ if (port->upcoming_state == FR_SWAP_SEND &&
+ port->tcpc->frs_sourcing_vbus)
+ port->tcpc->frs_sourcing_vbus(port->tcpc);
+ break;
case PORT_RESET:
case PORT_RESET_WAIT_OFF:
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] usb: typec: tcpm: fix missed frs_sourcing_vbus() call during FRS
2026-11-22 10:28 [PATCH] usb: typec: tcpm: fix missed frs_sourcing_vbus() call during FRS Max Andreev
@ 2026-11-22 10:38 ` Greg Kroah-Hartman
2026-11-22 11:54 ` Max Andreev
2026-11-22 11:56 ` [PATCH v2] " Max Andreev
0 siblings, 2 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2026-11-22 10:38 UTC (permalink / raw)
To: Max Andreev
Cc: Badhri Jagan Sridharan, Heikki Krogerus, Kyle Tso, stable,
linux-usb, linux-kernel
On Sun, Nov 22, 2026 at 10:28:38AM +0000, Max Andreev wrote:
> Since commit 0908c5aca31e ("usb: typec: tcpm: AMS and Collision
> Avoidance") the TCPC reports sourcing vbus while the port is still in
> AMS_START with FR_SWAP_SEND as the upcoming state. Because of
> _tcpm_pd_vbus_on() ignores this state, frs_sourcing_vbus() is never called
> during FRS.
>
> On Pixel 11 Pro XL after an FRS from sink to source the phone keeps
> showing the charging indicator, and about 20 seconds later VBUS drops
> and the attached device reboots.
>
> Call frs_sourcing_vbus() from AMS_START when the upcoming state is
> FR_SWAP_SEND.
>
> ---
> I'm not test theese changes on mainline, but tested on Pixel 11 Pro XL
> vendor kernel 6.1 with the same _tcpm_pd_vbus_on() code, as i see
> mainline tcpm.c is identical in this area.
>
> Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance")
> Cc: stable@vger.kernel.org
> Signed-off-by: Max Andreev <drunkbatya.js@gmail.com>
Why is this all below the --- line? That will get cut off :(
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH] usb: typec: tcpm: fix missed frs_sourcing_vbus() call during FRS
2026-11-22 10:38 ` Greg Kroah-Hartman
@ 2026-11-22 11:54 ` Max Andreev
2026-11-22 11:56 ` [PATCH v2] " Max Andreev
1 sibling, 0 replies; 4+ messages in thread
From: Max Andreev @ 2026-11-22 11:54 UTC (permalink / raw)
To: Badhri Jagan Sridharan, Heikki Krogerus, Greg Kroah-Hartman,
Kyle Tso
Cc: Max Andreev, stable, linux-usb, linux-kernel
Since commit 0908c5aca31e ("usb: typec: tcpm: AMS and Collision
Avoidance") the TCPC reports sourcing vbus while the port is still in
AMS_START with FR_SWAP_SEND as the upcoming state. Because of
_tcpm_pd_vbus_on() ignores this state, frs_sourcing_vbus() is never called
during FRS.
On Pixel 11 Pro XL after an FRS from sink to source the phone keeps
showing the charging indicator, and about 20 seconds later VBUS drops
and the attached device reboots.
Call frs_sourcing_vbus() from AMS_START when the upcoming state is
FR_SWAP_SEND.
---
I'm not test theese changes on mainline, but tested on Pixel 11 Pro XL
vendor kernel 6.1 with the same _tcpm_pd_vbus_on() code, as i see
mainline tcpm.c is identical in this area.
Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance")
Cc: stable@vger.kernel.org
Signed-off-by: Max Andreev <drunkbatya.js@gmail.com>
---
drivers/usb/typec/tcpm/tcpm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 51e5c72799f2..5caa649a92f1 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -6889,6 +6889,11 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port)
port->tcpc->frs_sourcing_vbus(port->tcpc);
tcpm_set_state(port, FR_SWAP_SNK_SRC_SOURCE_VBUS_APPLIED, 0);
break;
+ case AMS_START:
+ if (port->upcoming_state == FR_SWAP_SEND &&
+ port->tcpc->frs_sourcing_vbus)
+ port->tcpc->frs_sourcing_vbus(port->tcpc);
+ break;
case PORT_RESET:
case PORT_RESET_WAIT_OFF:
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH v2] usb: typec: tcpm: fix missed frs_sourcing_vbus() call during FRS
2026-11-22 10:38 ` Greg Kroah-Hartman
2026-11-22 11:54 ` Max Andreev
@ 2026-11-22 11:56 ` Max Andreev
1 sibling, 0 replies; 4+ messages in thread
From: Max Andreev @ 2026-11-22 11:56 UTC (permalink / raw)
To: Badhri Jagan Sridharan, Heikki Krogerus, Greg Kroah-Hartman,
Kyle Tso
Cc: Max Andreev, stable, linux-usb, linux-kernel
Since commit 0908c5aca31e ("usb: typec: tcpm: AMS and Collision
Avoidance") the TCPC reports sourcing vbus while the port is still in
AMS_START with FR_SWAP_SEND as the upcoming state. Because of
_tcpm_pd_vbus_on() ignores this state, frs_sourcing_vbus() is never called
during FRS.
On Pixel 11 Pro XL after an FRS from sink to source the phone keeps
showing the charging indicator, and about 20 seconds later VBUS drops
and the attached device reboots.
Call frs_sourcing_vbus() from AMS_START when the upcoming state is
FR_SWAP_SEND.
Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance")
Cc: stable@vger.kernel.org
Signed-off-by: Max Andreev <drunkbatya.js@gmail.com>
---
v2: moved the trailers above the --- line
I'm not test theese changes on mainline, but tested on Pixel 11 Pro XL
vendor kernel 6.1 with the same _tcpm_pd_vbus_on() code, as i see
mainline tcpm.c is identical in this area.
drivers/usb/typec/tcpm/tcpm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index 51e5c72799f2..5caa649a92f1 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -6889,6 +6889,11 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port)
port->tcpc->frs_sourcing_vbus(port->tcpc);
tcpm_set_state(port, FR_SWAP_SNK_SRC_SOURCE_VBUS_APPLIED, 0);
break;
+ case AMS_START:
+ if (port->upcoming_state == FR_SWAP_SEND &&
+ port->tcpc->frs_sourcing_vbus)
+ port->tcpc->frs_sourcing_vbus(port->tcpc);
+ break;
case PORT_RESET:
case PORT_RESET_WAIT_OFF:
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-22 11:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 10:28 [PATCH] usb: typec: tcpm: fix missed frs_sourcing_vbus() call during FRS Max Andreev
2026-11-22 10:38 ` Greg Kroah-Hartman
2026-11-22 11:54 ` Max Andreev
2026-11-22 11:56 ` [PATCH v2] " Max Andreev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox