From: Greg KH <gregkh@linuxfoundation.org>
To: Zijun Hu <quic_zijuhu@quicinc.com>
Cc: luiz.dentz@gmail.com, luiz.von.dentz@intel.com,
marcel@holtmann.org, linux-bluetooth@vger.kernel.org,
bartosz.golaszewski@linaro.org, krzysztof.kozlowski@linaro.org,
wt@penguintechs.org, regressions@lists.linux.dev,
kernel@quicinc.com
Subject: Re: [PATCH v6 2/2] Bluetooth: qca: Fix BT enable failure for QCA6390 after disable then warm reboot
Date: Tue, 23 Apr 2024 20:22:05 -0700 [thread overview]
Message-ID: <2024042357-nanometer-importer-9e89@gregkh> (raw)
In-Reply-To: <1713919602-5812-3-git-send-email-quic_zijuhu@quicinc.com>
On Wed, Apr 24, 2024 at 08:46:42AM +0800, Zijun Hu wrote:
> From: Zijun Hu <zijuhu@qti.qualcomm.com>
>
> Commit 272970be3dab ("Bluetooth: hci_qca: Fix driver shutdown on closed
> serdev") will cause below regression issue:
>
> BT can't be enabled after below steps:
> cold boot -> enable BT -> disable BT -> warm reboot -> BT enable failure
> if property enable-gpios is not configured within DT|ACPI for QCA6390.
>
> The commit is to fix a use-after-free issue within qca_serdev_shutdown()
> during reboot, but also introduces this regression issue regarding above
> steps since the VSC is not sent to reset controller during warm reboot.
>
> Fixed by sending the VSC to reset controller within qca_serdev_shutdown()
> once BT was ever enabled, and the use-after-free issue is also be fixed
> by this change since serdev is still opened when send to serdev.
>
> Fixes: 272970be3dab ("Bluetooth: hci_qca: Fix driver shutdown on closed serdev")
> Reported-by: Wren Turkal <wt@penguintechs.org>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218726
> Signed-off-by: Zijun Hu <zijuhu@qti.qualcomm.com>
> Tested-by: Wren Turkal <wt@penguintechs.org>
> ---
> Changes:
> V3 -> V6: Correct title and commit message
> V1 -> V3: Remove debugging logs
>
> drivers/bluetooth/hci_qca.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 4079254fb1c8..fc027da98297 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -2439,13 +2439,12 @@ static void qca_serdev_shutdown(struct device *dev)
> struct qca_serdev *qcadev = serdev_device_get_drvdata(serdev);
> struct hci_uart *hu = &qcadev->serdev_hu;
> struct hci_dev *hdev = hu->hdev;
> - struct qca_data *qca = hu->priv;
> const u8 ibs_wake_cmd[] = { 0xFD };
> const u8 edl_reset_soc_cmd[] = { 0x01, 0x00, 0xFC, 0x01, 0x05 };
>
> if (qcadev->btsoc_type == QCA_QCA6390) {
> - if (test_bit(QCA_BT_OFF, &qca->flags) ||
> - !test_bit(HCI_RUNNING, &hdev->flags))
> + if (test_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks) ||
> + hci_dev_test_flag(hdev, HCI_SETUP))
> return;
>
> serdev_device_write_flush(serdev);
> --
> 2.7.4
>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- You have marked a patch with a "Fixes:" tag for a commit that is in an
older released kernel, yet you do not have a cc: stable line in the
signed-off-by area at all, which means that the patch will not be
applied to any older kernel releases. To properly fix this, please
follow the documented rules in the
Documentation/process/stable-kernel-rules.rst file for how to resolve
this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
prev parent reply other threads:[~2024-04-24 3:22 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 0:46 [PATCH v6 0/2] Fix two BT regression issues for QCA6390 Zijun Hu
2024-04-24 0:46 ` [PATCH v6 1/2] Bluetooth: qca: Fix BT enable failure " Zijun Hu
2024-04-24 2:40 ` Fix two BT regression issues " bluez.test.bot
2024-04-24 3:21 ` [PATCH v6 1/2] Bluetooth: qca: Fix BT enable failure " Greg KH
2024-04-24 4:06 ` Krzysztof Kozlowski
2024-04-24 4:07 ` quic_zijuhu
2024-04-24 4:10 ` Krzysztof Kozlowski
2024-04-24 4:18 ` quic_zijuhu
2024-04-24 4:31 ` Krzysztof Kozlowski
2024-04-24 4:33 ` quic_zijuhu
2024-04-24 5:04 ` Wren Turkal
2024-04-24 5:33 ` quic_zijuhu
2024-04-24 13:56 ` Luiz Augusto von Dentz
2024-04-24 14:01 ` quic_zijuhu
2024-04-25 17:37 ` Elliot Berman
2024-04-26 2:45 ` quic_zijuhu
2024-04-24 13:49 ` Luiz Augusto von Dentz
2024-04-24 13:51 ` quic_zijuhu
2024-04-24 13:52 ` Bartosz Golaszewski
2024-04-24 13:53 ` quic_zijuhu
2024-04-24 14:00 ` Bartosz Golaszewski
2024-04-24 14:08 ` quic_zijuhu
2024-04-24 14:08 ` Luiz Augusto von Dentz
2024-04-24 14:12 ` quic_zijuhu
2024-04-24 14:19 ` Bartosz Golaszewski
2024-04-24 14:25 ` quic_zijuhu
2024-04-24 14:41 ` Bartosz Golaszewski
2024-04-24 14:44 ` Krzysztof Kozlowski
2024-04-24 14:46 ` quic_zijuhu
2024-04-24 15:31 ` Luiz Augusto von Dentz
2024-04-24 15:42 ` quic_zijuhu
2024-04-24 14:02 ` Luiz Augusto von Dentz
2024-04-24 0:46 ` [PATCH v6 2/2] Bluetooth: qca: Fix BT enable failure for QCA6390 after disable then warm reboot Zijun Hu
2024-04-24 3:22 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024042357-nanometer-importer-9e89@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=kernel@quicinc.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=luiz.von.dentz@intel.com \
--cc=marcel@holtmann.org \
--cc=quic_zijuhu@quicinc.com \
--cc=regressions@lists.linux.dev \
--cc=wt@penguintechs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox