All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
To: Wren Turkal <wt@penguintechs.org>
Cc: quic_zijuhu <quic_zijuhu@quicinc.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	luiz.dentz@gmail.com,  luiz.von.dentz@intel.com,
	marcel@holtmann.org,  linux-bluetooth@vger.kernel.org,
	regressions@lists.linux.dev
Subject: Re: [PATCH v4 0/2] Fix two regression issues for QCA controllers
Date: Mon, 22 Apr 2024 10:51:24 +0200	[thread overview]
Message-ID: <CACMJSevocRot6J06uvridRw9MZFftJrkCyYBgXhLnwfapVPnCw@mail.gmail.com> (raw)
In-Reply-To: <dc17aea1-9399-4c2b-8775-fa0a7f602035@penguintechs.org>

On Mon, 22 Apr 2024 at 07:21, Wren Turkal <wt@penguintechs.org> wrote:
>
> As the user who originally reported thes issue, I can confirm this. I
> was introduced to this regression because I use Fedora Rawhide on my
> laptop, which builds and pushes kernels based on mainline very regularly.
>

I don't doubt my patch could have caused a regression.

> Here is my description of the regression: After the reverted change, the
> BT hardware in my laptop (qca6390) will only work after a cold boot when
> the hardware has only be enabled once by the driver. Once the hardware
> is enabled, the process of disabling/re-enabling fails. Also, the
> hardware cannot be enabled after a warm boot of the laptop.
>
> Among other things, this makes logging into KDE Plasma break my
> bluetooth mouse. The cause of this breakage appears to be that Plasma
> disables/re-enables bluetooth hardware upon login.
>
> GNOME operates slightly less badly in that bluetooth stays enabled.
> However, if I manually disable the bluetooth via the ui or by restarting
> the bluetooth service with systemctl, the mouse fails in the same way as
> happens with Plasma.
>
> Once the bluetooth has failed, the only way to fix is a cold boot and
> only enable the hardware once. I cannot remove the modules (btqca,
> hci_uart, and bluetooth) and re-modprobe them to fix it. I can't restart
> the bluetooth service. I can't do both of those things. I haven't found
> any way to re-enable the hardware beyond cold boot with bluetooth
> service enabled.
>
> If I disable the bluetooth service and cold boot the laptop, there also
> appears to be some kind of race condition as not enabling bluetooth
> service very soon after loading the hci_uart and btqca modules during
> boot puts the system in a state where I can never enable bluetooth. I do
> not know what causes this specifically, but my theory is that not
> starting the bluetooth service immediately puts the driver in a similar
> state as when the service is started immediately. Maybe some kind of
> lazy initialization that is forced to happen more quickly when the
> bluetooth service is enabled?
>
> Any way, this reversion by itself (which I manually did after a
> discussion with Zijun before getting his test patches applying to my
> kernel for test). However, this reversion did not get the hardware
> working after a warm boot.
>

This all sounds plausible. However just reverting this patch is a
waste of time as checking IS_ERR_OR_NULL() on the return value of
gpiod_get_optional() and continuing on error is wrong as I explained
several times under Ziju's emails already. I provided a suggestion:
bail out on error returned from gpiod_get_optional() even if the
driver could technically continue in some cases. I don't want to have
to argue this anymore.

Bart

  reply	other threads:[~2024-04-22  8:51 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 14:06 [PATCH v1 0/2] Fix two regression issues for QCA controllers Zijun Hu
2024-04-18 14:06 ` [PATCH v1 1/2] Revert "Bluetooth: hci_qca: don't use IS_ERR_OR_NULL() with gpiod_get_optional()" Zijun Hu
2024-04-18 14:31   ` Fix two regression issues for QCA controllers bluez.test.bot
2024-04-18 16:52   ` [PATCH v1 1/2] Revert "Bluetooth: hci_qca: don't use IS_ERR_OR_NULL() with gpiod_get_optional()" Krzysztof Kozlowski
2024-04-18 21:16     ` quic_zijuhu
2024-04-18 22:37       ` Krzysztof Kozlowski
2024-04-18 23:17         ` quic_zijuhu
2024-04-19 13:49           ` Krzysztof Kozlowski
2024-04-20  5:25             ` quic_zijuhu
2024-04-20  5:27               ` quic_zijuhu
2024-04-20 11:13               ` Krzysztof Kozlowski
2024-04-20 23:01                 ` quic_zijuhu
2024-04-18 17:00   ` Bartosz Golaszewski
2024-04-18 21:43     ` quic_zijuhu
2024-04-18 22:42       ` Bartosz Golaszewski
2024-04-18 23:36         ` quic_zijuhu
2024-04-19 21:27           ` Bartosz Golaszewski
2024-04-20  5:39             ` quic_zijuhu
2024-04-21  7:14         ` Wren Turkal
2024-04-21  9:40           ` quic_zijuhu
2024-04-22  5:26             ` Wren Turkal
2024-04-18 14:06 ` [PATCH v1 2/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 after disable then warm reboot Zijun Hu
2024-04-18 16:48   ` Krzysztof Kozlowski
2024-04-18 20:34     ` quic_zijuhu
2024-04-18 20:58       ` Krzysztof Kozlowski
2024-04-18 22:05         ` quic_zijuhu
2024-04-18 22:38           ` Krzysztof Kozlowski
2024-04-18 23:24             ` quic_zijuhu
2024-04-19 21:48 ` [PATCH v1 0/2] Fix two regression issues for QCA controllers Zijun Hu
2024-04-19 21:48   ` [PATCH v2 1/2] Bluetooth: MGMT: Fix failing to MGMT_OP_ADD_UUID/MGMT_OP_REMOVE_UUID Zijun Hu
2024-04-19 22:05     ` quic_zijuhu
2024-04-19 22:12     ` [v2,1/2] " bluez.test.bot
2024-04-19 21:48   ` [PATCH v2 2/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 Zijun Hu
2024-04-19 22:06     ` quic_zijuhu
2024-04-19 22:03 ` [PATCH v3 0/2] Fix two regression issues for QCA controllers Zijun Hu
2024-04-19 22:03   ` [PATCH v3 1/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 Zijun Hu
2024-04-19 22:30     ` Fix two regression issues for QCA controllers bluez.test.bot
2024-04-20 11:03     ` [PATCH v3 1/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 Krzysztof Kozlowski
2024-04-20 21:28       ` quic_zijuhu
2024-04-19 22:03   ` [PATCH v3 2/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 after disable then warm reboot Zijun Hu
2024-04-20 11:07     ` Krzysztof Kozlowski
2024-04-20 21:42       ` quic_zijuhu
2024-04-20 11:01   ` [PATCH v3 0/2] Fix two regression issues for QCA controllers Krzysztof Kozlowski
2024-04-22  7:44     ` Krzysztof Kozlowski
2024-04-22  8:07       ` quic_zijuhu
2024-04-22  8:11         ` Krzysztof Kozlowski
2024-04-22  8:21           ` quic_zijuhu
2024-04-20 22:06   ` [PATCH v4 " Zijun Hu
2024-04-20 22:06     ` [PATCH v4 1/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 Zijun Hu
2024-04-20 22:31       ` Fix two regression issues for QCA controllers bluez.test.bot
2024-04-20 22:06     ` [PATCH v4 2/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 after disable then warm reboot Zijun Hu
2024-04-21  7:44     ` [PATCH v4 0/2] Fix two regression issues for QCA controllers Wren Turkal
2024-04-21  9:30       ` quic_zijuhu
2024-04-21 18:41       ` Krzysztof Kozlowski
2024-04-22  0:14         ` quic_zijuhu
2024-04-22  5:21           ` Wren Turkal
2024-04-22  8:51             ` Bartosz Golaszewski [this message]
2024-04-22 10:42               ` Wren Turkal
2024-04-22 13:02                 ` Bartosz Golaszewski
2024-04-24  1:52                   ` Wren Turkal
2024-04-22  5:52           ` Krzysztof Kozlowski
2024-04-22  6:00             ` quic_zijuhu
2024-04-22  7:45               ` Krzysztof Kozlowski
2024-04-22 10:05             ` quic_zijuhu
2024-04-22 12:28               ` Krzysztof Kozlowski
2024-04-21 13:51     ` Krzysztof Kozlowski
2024-04-22  7:38     ` [PATCH v5 " Zijun Hu
2024-04-22  7:38       ` [PATCH v5 1/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 Zijun Hu
2024-04-22  8:36         ` Fix two regression issues for QCA controllers bluez.test.bot
2024-04-22  7:38       ` [PATCH v5 2/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 after disable then warm reboot Zijun Hu
2024-04-22  7:42         ` Krzysztof Kozlowski
2024-04-22 11:25           ` quic_zijuhu
2024-04-22 12:22             ` Krzysztof Kozlowski
2024-04-22 12:59               ` quic_zijuhu
2024-04-25  0:59       ` [PATCH v6 v7] Fix two BT regression issues for QCA6390 Zijun Hu

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=CACMJSevocRot6J06uvridRw9MZFftJrkCyYBgXhLnwfapVPnCw@mail.gmail.com \
    --to=bartosz.golaszewski@linaro.org \
    --cc=krzk@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.