All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: quic_zijuhu <quic_zijuhu@quicinc.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Wren Turkal <wt@penguintechs.org>, <luiz.dentz@gmail.com>,
	<luiz.von.dentz@intel.com>, <marcel@holtmann.org>
Cc: <linux-bluetooth@vger.kernel.org>,
	<bartosz.golaszewski@linaro.org>, <regressions@lists.linux.dev>
Subject: Re: [PATCH v4 0/2] Fix two regression issues for QCA controllers
Date: Mon, 22 Apr 2024 18:05:52 +0800	[thread overview]
Message-ID: <96702ddc-ef5c-499c-abd4-95f89eb3aeba@quicinc.com> (raw)
In-Reply-To: <2bd1f1bf-f867-4430-8ce5-c691485665e1@kernel.org>

On 4/22/2024 1:52 PM, Krzysztof Kozlowski wrote:
> On 22/04/2024 02:14, quic_zijuhu wrote:
>> On 4/22/2024 2:41 AM, Krzysztof Kozlowski wrote:
>>> On 21/04/2024 09:44, Wren Turkal wrote:
>>>> On 4/20/24 3:06 PM, Zijun Hu wrote:
>>>>> This patch series are to fix below 2 regression issues for QCA controllers
>>>>> 1) BT can't be enabled once BT was ever enabled for QCA_QCA6390
>>>>> 2) BT can't be enabled after disable then warm reboot for QCA_QCA6390
>>>>
>>>> @Zijun @Krzysztof and @Bartosz Would it be helpful for me to test these 
>>>> to ensure they fix the issues I reported?
>>>>
>>>
>>> I look forward to someone testing these on other hardware, not yours. On
>>> the hardware where the original issues were happening leading to this
>>> changes, e.g. RB5.
>>>
>>> Anyway, the problem here is poor explanation of the problem which did
>>> not improve in v3 and v4. Instead I receive explanations like:
>>>
>>> "this is shutdown of serdev and not hdev's shutdown."
>>> Not related...
>>>
>> this is the reply for secondary issue. i believe i have given much
>> explain for my fix for the 2nd issue as shown by below links.
> 
> No, you did not.
> 
>> let me add a bit more explanation within the ending "For the 2nd issue"
>> section, supposed you known much for generic flag
>> HCI_QUIRK_NON_PERSISTENT_SETUP, otherwise, see header comment for the
>> quirk. also supposed you see commit history to find why
>> qca_serdev_shutdown() was introduced for QCA6390.
>> https://lore.kernel.org/all/fe1a0e3b-3408-4a33-90e9-d4ffcfc7a99b@quicinc.com/
> 
> You did not answer my questions.
> 
> Let's quote:
> 
> "i don't explain much since these HCI_QUIRK_NON_PERSISTENT_SETUP and
> HCI_SETUP is generic flag."
> 
> Srsly, what is such answer?
> 
> 
i reviewed my reply. i have explained to you why my change fix both this
issue and the issue your commit fixed.

so i don't think it is meaningful to explain why your wrong condition
are changed by me.
> 
> 
> 
>>> "now. you understood why your merged change as shown link of 4) have
>>> problems and introduced our discussed issue, right?"
>>>
>> this is the reply for the first issue as shown by below link. it almost
>> have the same description as the following "For 1st issue:" section.
>> i believe it have clear illustration why the commit have bugs.
>> https://lore.kernel.org/all/2166fc66-9340-4e8c-8662-17a19a7d8ce6@linaro.org/
>>> No. I did not understand and I feel I am wasting here time.
>>>> Code could be correct, could be wrong. Especially second patch looks
>>> suspicious. But the way Zijun Hu explains it and the way Zijun Hu
>>> responds is not helping at all.
>>>
>>> Sorry, with such replies to review, it is not worth my time.
>>>
>>> Best regards,
>>> Krzysztof
>>>
>> Hi luiz,marcel
>>
>> it is time for me to request you give comments for our discussion
>> and for my fixes, Let me explain the 1st issue then 2nd one.
> 
> You keep pushing and pushing even though I stated my remarks.
> 
> 
>>
>> For 1st issue:
>> 1) the following commit will cause serious regression issue for QCA
>> controllers, and it has been merged with linus's mainline kernel.
>>
>> Commit 56d074d26c58 ("Bluetooth: hci_qca: don't use IS_ERR_OR_NULL()
>> with gpiod_get_optional()").
>>
>> 2) the regression issue is described by [PATCH v4 1/2] commit message
>>   as following:
>>   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
>> QCA_QCA6390.
>>   i will verify and confirm if QCA_QCA2066 and QCA_ROME also are impacted.
>>
>> 3) let me explain the bug point for commit mentioned by 1), its
>>    commit message and bug change applet are shown below.
>>
>> The optional variants for the gpiod_get() family of functions return
>> NULL if the GPIO in question is not associated with this device. They
>> return ERR_PTR() on any other error. NULL descriptors are graciously
>> handled by GPIOLIB and can be safely passed to any of the GPIO consumer
>> interfaces as they will return 0 and act as if the function succeeded.
>> If one is using the optional variant, then there's no point in checking
>> for NULL.
>>
>>  		qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable",
>>  					       GPIOD_OUT_LOW);
>> -		if (IS_ERR_OR_NULL(qcadev->bt_en)) {
>> +		if (IS_ERR(qcadev->bt_en)) {
>>  			dev_warn(&serdev->dev, "failed to acquire enable gpio\n");
>>  			power_ctrl_enabled = false;
>>  		}
>>    3.1) we only need to discuss how to handle case "qcadev->bt_en ==
>> NULL" since this is only difference between the commit and BT original
>> design.
>>    3.2) BT original design are agree with the point of above commit
>> message that case "qcadev->bt_en == NULL" should not be treated as
>> error, so BT original design does not do error return for the case and
>> use dev_warn() instead of dev_err() to give.
>>    3.3) the commit misunderstands BT original design and wrongly think
>> BT original design take "qcadev->bt_en == NULL" as error case,
>> so change the following flag power_ctrl_enabled set logic and cause
>> discussed issue.
>>
>> For the 2nd issue:
>> 1) the following commit will cause below regression issue for QCA_QCA6390.
>> Commit 272970be3dab ("Bluetooth: hci_qca: Fix driver shutdown on closed
>>     serdev")
>>
>> 2) the regression issue is described by [PATCH v4 2/2] commit message
>>   as following:
>>   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
>> QCA_QCA6390.
> 
> You did not address original issue of crash during shutdown and did not
> clarify my questions.
> 
as i statemented. my fix have fixed both this issue and the original
crash issue. don't need to talk about others.
>>
>> 3) qca_serdev_shutdown() is serdev's shutdown and not hdev's shutdown()
>> it should not and also never get chance to be invoked even if BT is
>> disabled at above 2) step.  qca_serdev_shutdown() need to send the VSC
>> to reset controller during warm reset phase of above 2) steps.
> 
> Anyway, any explanation providing background how you are fixing this
> issue while keeping *previous problem fixed* is useful but should be
> provided in commit msg. I asked about this two or three times.
> 
> BTW, provide here exact kernel version you tested this patches with.
> Also the exact hardware.
> 
there are almost no commit with tag Tested-by also provide exact kernel
version. for one type bt controller. different h/w has different config.
important is that this issue is fixed in reported H/W and don't cause
issue for other issue.

let us stop here and wait for other comments.

i have given too much explanations for my change of only total 7 lines.
> 
> Best regards,
> Krzysztof
> 


  parent reply	other threads:[~2024-04-22 10:06 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
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 [this message]
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=96702ddc-ef5c-499c-abd4-95f89eb3aeba@quicinc.com \
    --to=quic_zijuhu@quicinc.com \
    --cc=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=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.