* [PATCH v2] serial: qcom_geni: Fix BT failure regression on RB2 platform
@ 2026-01-07 16:26 Praveen Talari
2026-01-07 17:41 ` Dmitry Baryshkov
2026-01-07 21:39 ` Mayank Rana
0 siblings, 2 replies; 5+ messages in thread
From: Praveen Talari @ 2026-01-07 16:26 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Praveen Talari, linux-arm-msm,
linux-kernel, linux-serial, bryan.odonoghue, dmitry.baryshkov,
andersson
Cc: psodagud, djaggi, quic_msavaliy, quic_vtanuku, quic_arandive,
quic_shazhuss, quic_cchiluve
Commit 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial
driver") caused BT init to fail during bootup on the RB2 platform,
preventing proper BT initialization. However, BT works correctly after
bootup completes.
The issue occurs when runtime PM is enabled and uart_add_one_port() is
called before wakeup IRQ setup. The uart_add_one_port() call activates
the device through runtime PM, which configures GPIOs to the "qup_x"
pinmux function during runtime resume. When wakeup IRQ registration
happens afterward using dev_pm_set_dedicated_wake_irq(), these GPIOs
are reset back to the "gpio" pinmux function, which impacts the RX GPIO
and leads to Bluetooth failures.
Fix this by ensuring wakeup IRQ setup is completed before calling
uart_add_one_port() to prevent the pinmux function conflict.
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Closes: https://lore.kernel.org/all/20251110101043.2108414-4-praveen.talari@oss.qualcomm.com/
Fixes: 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial driver")
Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
---
v1 -> v2
- Updated commit text.
- Added Tested-by in commit text
---
drivers/tty/serial/qcom_geni_serial.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 6ce6528f5c10..46a9c71630d5 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1888,12 +1888,6 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
if (ret)
goto error;
- devm_pm_runtime_enable(port->se.dev);
-
- ret = uart_add_one_port(drv, uport);
- if (ret)
- goto error;
-
if (port->wakeup_irq > 0) {
device_init_wakeup(&pdev->dev, true);
ret = dev_pm_set_dedicated_wake_irq(&pdev->dev,
@@ -1906,6 +1900,12 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
}
}
+ devm_pm_runtime_enable(port->se.dev);
+
+ ret = uart_add_one_port(drv, uport);
+ if (ret)
+ goto error;
+
return 0;
error:
base-commit: 6cd6c12031130a349a098dbeb19d8c3070d2dfbe
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] serial: qcom_geni: Fix BT failure regression on RB2 platform
2026-01-07 16:26 [PATCH v2] serial: qcom_geni: Fix BT failure regression on RB2 platform Praveen Talari
@ 2026-01-07 17:41 ` Dmitry Baryshkov
2026-01-08 3:42 ` Praveen Talari
2026-01-07 21:39 ` Mayank Rana
1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Baryshkov @ 2026-01-07 17:41 UTC (permalink / raw)
To: Praveen Talari
Cc: Greg Kroah-Hartman, Jiri Slaby, linux-arm-msm, linux-kernel,
linux-serial, bryan.odonoghue, andersson, psodagud, djaggi,
quic_msavaliy, quic_vtanuku, quic_arandive, quic_shazhuss,
quic_cchiluve
On Wed, Jan 07, 2026 at 09:56:10PM +0530, Praveen Talari wrote:
> Commit 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial
> driver") caused BT init to fail during bootup on the RB2 platform,
> preventing proper BT initialization. However, BT works correctly after
> bootup completes.
>
> The issue occurs when runtime PM is enabled and uart_add_one_port() is
> called before wakeup IRQ setup. The uart_add_one_port() call activates
> the device through runtime PM, which configures GPIOs to the "qup_x"
> pinmux function during runtime resume. When wakeup IRQ registration
> happens afterward using dev_pm_set_dedicated_wake_irq(), these GPIOs
> are reset back to the "gpio" pinmux function, which impacts the RX GPIO
> and leads to Bluetooth failures.
>
> Fix this by ensuring wakeup IRQ setup is completed before calling
> uart_add_one_port() to prevent the pinmux function conflict.
>
> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Closes: https://lore.kernel.org/all/20251110101043.2108414-4-praveen.talari@oss.qualcomm.com/
> Fixes: 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial driver")
The order of tags is odd. How can it be tested before being reported?
I'd suggest the following order:
- Fixes
- Reported-by
- Closes
- Tested-by
- Reviewed-by
> Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
> ---
> v1 -> v2
> - Updated commit text.
> - Added Tested-by in commit text
> ---
> drivers/tty/serial/qcom_geni_serial.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
With the tag order fixed:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] serial: qcom_geni: Fix BT failure regression on RB2 platform
2026-01-07 16:26 [PATCH v2] serial: qcom_geni: Fix BT failure regression on RB2 platform Praveen Talari
2026-01-07 17:41 ` Dmitry Baryshkov
@ 2026-01-07 21:39 ` Mayank Rana
2026-01-08 3:44 ` Praveen Talari
1 sibling, 1 reply; 5+ messages in thread
From: Mayank Rana @ 2026-01-07 21:39 UTC (permalink / raw)
To: Praveen Talari, Greg Kroah-Hartman, Jiri Slaby, linux-arm-msm,
linux-kernel, linux-serial, bryan.odonoghue, dmitry.baryshkov,
andersson
Cc: psodagud, djaggi, quic_msavaliy, quic_vtanuku, quic_arandive,
quic_shazhuss, quic_cchiluve
On 1/7/2026 8:26 AM, Praveen Talari wrote:
> Commit 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial
> driver") caused BT init to fail during bootup on the RB2 platform,
> preventing proper BT initialization. However, BT works correctly after
> bootup completes.
>
> The issue occurs when runtime PM is enabled and uart_add_one_port() is
> called before wakeup IRQ setup. The uart_add_one_port() call activates
> the device through runtime PM, which configures GPIOs to the "qup_x"
> pinmux function during runtime resume. When wakeup IRQ registration
> happens afterward using dev_pm_set_dedicated_wake_irq(), these GPIOs
> are reset back to the "gpio" pinmux function, which impacts the RX GPIO
> and leads to Bluetooth failures.
>
> Fix this by ensuring wakeup IRQ setup is completed before calling
> uart_add_one_port() to prevent the pinmux function conflict.
>
> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Closes: https://lore.kernel.org/all/20251110101043.2108414-4-praveen.talari@oss.qualcomm.com/
> Fixes: 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial driver")
> Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
> ---
> v1 -> v2
> - Updated commit text.
> - Added Tested-by in commit text
> ---
> drivers/tty/serial/qcom_geni_serial.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index 6ce6528f5c10..46a9c71630d5 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -1888,12 +1888,6 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
> if (ret)
> goto error;
>
> - devm_pm_runtime_enable(port->se.dev);
> -
> - ret = uart_add_one_port(drv, uport);
> - if (ret)
> - goto error;
> -
> if (port->wakeup_irq > 0) {
> device_init_wakeup(&pdev->dev, true);
> ret = dev_pm_set_dedicated_wake_irq(&pdev->dev,
do you need to handle error handling part here as calling
uart_remove_one_port() shall result into NULL access related crash while
accessing port->port_dev as port_dev is not allocated
(serial_base_port_add() add is not being called due to moving
uart_add_one_port() later)
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1901,7 +1901,6 @@ static int qcom_geni_serial_probe(struct
platform_device *pdev)
if (ret) {
device_init_wakeup(&pdev->dev, false);
ida_free(&port_ida, uport->line);
- uart_remove_one_port(drv, uport);
goto error;
}
}
> @@ -1906,6 +1900,12 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
> }
> }
>
> + devm_pm_runtime_enable(port->se.dev);
> +
> + ret = uart_add_one_port(drv, uport);
> + if (ret)
> + goto error;
> +
> return 0;
>
> error:
>
> base-commit: 6cd6c12031130a349a098dbeb19d8c3070d2dfbe
Regards,
Mayank
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] serial: qcom_geni: Fix BT failure regression on RB2 platform
2026-01-07 17:41 ` Dmitry Baryshkov
@ 2026-01-08 3:42 ` Praveen Talari
0 siblings, 0 replies; 5+ messages in thread
From: Praveen Talari @ 2026-01-08 3:42 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Greg Kroah-Hartman, Jiri Slaby, linux-arm-msm, linux-kernel,
linux-serial, bryan.odonoghue, andersson, psodagud, djaggi,
quic_msavaliy, quic_vtanuku, quic_arandive, quic_shazhuss,
quic_cchiluve
Hi Dmistry,
Thank you for your inputs.
On 1/7/2026 11:11 PM, Dmitry Baryshkov wrote:
> On Wed, Jan 07, 2026 at 09:56:10PM +0530, Praveen Talari wrote:
>> Commit 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial
>> driver") caused BT init to fail during bootup on the RB2 platform,
>> preventing proper BT initialization. However, BT works correctly after
>> bootup completes.
>>
>> The issue occurs when runtime PM is enabled and uart_add_one_port() is
>> called before wakeup IRQ setup. The uart_add_one_port() call activates
>> the device through runtime PM, which configures GPIOs to the "qup_x"
>> pinmux function during runtime resume. When wakeup IRQ registration
>> happens afterward using dev_pm_set_dedicated_wake_irq(), these GPIOs
>> are reset back to the "gpio" pinmux function, which impacts the RX GPIO
>> and leads to Bluetooth failures.
>>
>> Fix this by ensuring wakeup IRQ setup is completed before calling
>> uart_add_one_port() to prevent the pinmux function conflict.
>>
>> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> Closes: https://lore.kernel.org/all/20251110101043.2108414-4-praveen.talari@oss.qualcomm.com/
>> Fixes: 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial driver")
>
> The order of tags is odd. How can it be tested before being reported?
> I'd suggest the following order:
> - Fixes
> - Reported-by
> - Closes
> - Tested-by
> - Reviewed-by
Thank you for your inputs. Will do it in next patch.
Thanks,
Praveen Talari
>
>> Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
>> ---
>> v1 -> v2
>> - Updated commit text.
>> - Added Tested-by in commit text
>> ---
>> drivers/tty/serial/qcom_geni_serial.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>
> With the tag order fixed:
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] serial: qcom_geni: Fix BT failure regression on RB2 platform
2026-01-07 21:39 ` Mayank Rana
@ 2026-01-08 3:44 ` Praveen Talari
0 siblings, 0 replies; 5+ messages in thread
From: Praveen Talari @ 2026-01-08 3:44 UTC (permalink / raw)
To: Mayank Rana, Greg Kroah-Hartman, Jiri Slaby, linux-arm-msm,
linux-kernel, linux-serial, bryan.odonoghue, dmitry.baryshkov,
andersson
Cc: psodagud, djaggi, quic_msavaliy, quic_vtanuku, quic_arandive,
quic_shazhuss, quic_cchiluve
Hi Mayank,
Thank you for the review.
On 1/8/2026 3:09 AM, Mayank Rana wrote:
>
>
> On 1/7/2026 8:26 AM, Praveen Talari wrote:
>> Commit 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial
>> driver") caused BT init to fail during bootup on the RB2 platform,
>> preventing proper BT initialization. However, BT works correctly after
>> bootup completes.
>>
>> The issue occurs when runtime PM is enabled and uart_add_one_port() is
>> called before wakeup IRQ setup. The uart_add_one_port() call activates
>> the device through runtime PM, which configures GPIOs to the "qup_x"
>> pinmux function during runtime resume. When wakeup IRQ registration
>> happens afterward using dev_pm_set_dedicated_wake_irq(), these GPIOs
>> are reset back to the "gpio" pinmux function, which impacts the RX GPIO
>> and leads to Bluetooth failures.
>>
>> Fix this by ensuring wakeup IRQ setup is completed before calling
>> uart_add_one_port() to prevent the pinmux function conflict.
>>
>> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> Closes: https://lore.kernel.org/all/20251110101043.2108414-4-
>> praveen.talari@oss.qualcomm.com/
>> Fixes: 10904d725f6e ("serial: qcom-geni: Enable PM runtime for serial
>> driver")
>> Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
>> ---
>> v1 -> v2
>> - Updated commit text.
>> - Added Tested-by in commit text
>> ---
>> drivers/tty/serial/qcom_geni_serial.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/
>> serial/qcom_geni_serial.c
>> index 6ce6528f5c10..46a9c71630d5 100644
>> --- a/drivers/tty/serial/qcom_geni_serial.c
>> +++ b/drivers/tty/serial/qcom_geni_serial.c
>> @@ -1888,12 +1888,6 @@ static int qcom_geni_serial_probe(struct
>> platform_device *pdev)
>> if (ret)
>> goto error;
>> - devm_pm_runtime_enable(port->se.dev);
>> -
>> - ret = uart_add_one_port(drv, uport);
>> - if (ret)
>> - goto error;
>> -
>> if (port->wakeup_irq > 0) {
>> device_init_wakeup(&pdev->dev, true);
>> ret = dev_pm_set_dedicated_wake_irq(&pdev->dev,
>
> do you need to handle error handling part here as calling
> uart_remove_one_port() shall result into NULL access related crash while
> accessing port->port_dev as port_dev is not allocated
> (serial_base_port_add() add is not being called due to moving
> uart_add_one_port() later)
Yes, you are correct. Will address it in next patch.
Thanks,
Praveen Talari
>
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -1901,7 +1901,6 @@ static int qcom_geni_serial_probe(struct
> platform_device *pdev)
> if (ret) {
> device_init_wakeup(&pdev->dev, false);
> ida_free(&port_ida, uport->line);
> - uart_remove_one_port(drv, uport);
> goto error;
> }
> }
>
>> @@ -1906,6 +1900,12 @@ static int qcom_geni_serial_probe(struct
>> platform_device *pdev)
>> }
>> }
>> + devm_pm_runtime_enable(port->se.dev);
>> +
>> + ret = uart_add_one_port(drv, uport);
>> + if (ret)
>> + goto error;
>> +
>> return 0;
>> error:
>>
>> base-commit: 6cd6c12031130a349a098dbeb19d8c3070d2dfbe
> Regards,
> Mayank
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-01-08 3:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-07 16:26 [PATCH v2] serial: qcom_geni: Fix BT failure regression on RB2 platform Praveen Talari
2026-01-07 17:41 ` Dmitry Baryshkov
2026-01-08 3:42 ` Praveen Talari
2026-01-07 21:39 ` Mayank Rana
2026-01-08 3:44 ` Praveen Talari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®