Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp356021lqp; Mon, 10 Jun 2024 06:23:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVl8tf2bxklW+CTU32WhIIyjEfC76eUofCpReyBVry4ZLxfc0QJLs9pCXpLK+UYgftcHmjlhpPWNVkK4+wlib/sUIs3EhQcxReh/+gSXg== X-Google-Smtp-Source: AGHT+IF5y5gSXxwhzvNnytWe4hK5dEP2iRHVeWKRL6Y9oPdGpgAt90BxSOmUeFDVGb+3QnUCr0Kn X-Received: by 2002:a17:902:e809:b0:1f7:c33:aa7b with SMTP id d9443c01a7336-1f70c33ac82mr36541475ad.12.1718025831578; Mon, 10 Jun 2024 06:23:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718025831; cv=pass; d=google.com; s=arc-20160816; b=A1q7LwHseRKOJUxF7ffOr7S/gt/+/Br4VBAwYnqyoHtG63WbUJMflr6vE1bpmp5NeP Jh+mCtpbK6S+A36Kkj4t2M7EOVxqtd5OT0Au4eHjVo65yHLfiDrGyCBpd6wbEz78XC88 GsPeyryAqV6JR3J6Cs2+6xbbCt8yDhZS2GSW72Xb0iZH/XocS4b+jEklirbihppYxwLQ 0Vcr+KjmOhPI8bNKx/WJGqebovdxHXZsI99ITyqpDFSbyv7mviNpfKWiFe4U3B1NGVRR L7sKEcr5l59VJcmJfXMJN7/SOTE2lUYoqdAhFwz27RpVvvvZILGwaNVhS1wIT2caHZOh coqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=/xi9sq9viF3AhnFJOXABtAS7QK7RPNhmxpE7hgLtAOQ=; fh=YVpF29/F1nOqKPlqvNBCEpGftlaDT9FCBi3pLTf8n10=; b=en0PFGo+/WGKtH7sk02fK0yVECcHlStm/SP3+tWdHnujmSVlZ7AJPAM0q5lBrBVgpO Mch3ycV0ESduuJheJdOr+pkOmelzoslwmdut1ZFFfTdOt7IVzn3oVQTA3txFHyf3bcAa 2C9kHyfZs9BokMp/hkseU/KJokEoJjB2uG9hcEEYIM6oDwz1ZiGwlSmhVvcwYZ5q/T3x 9dUzGpTQERAaJBAMKTb5D1Rgs+1ST6rnmBY5BMerYegpKhIXhkpuxYZRfYaTyF/gYawU 6JfRp1Eu+L8lJHBm9WcjFXehbc/wG5xGqqRUPAKyv/brmp7WHBIr8DCYfMRwqyN861LD e90w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=UlasUtKv; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-bluetooth+bounces-5225-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5225-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f726dcc4b8si443915ad.504.2024.06.10.06.23.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 06:23:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5225-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=UlasUtKv; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-bluetooth+bounces-5225-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5225-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 684AEB20ABD for ; Mon, 10 Jun 2024 13:18:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DD988249B; Mon, 10 Jun 2024 13:18:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="UlasUtKv" X-Original-To: linux-bluetooth@vger.kernel.org Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.2]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA24B4501B; Mon, 10 Jun 2024 13:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.2 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718025523; cv=none; b=JOiX0LKkNMpctjWLQNXs4MhKcYKoiw+DbOHyJd/1FJYfE6XleDn09xghHQ3BJ/obLtP4TBdnYpbCFKTJIRMsdb6Bl4OfJ6kbf2nlnL7nrRh7Fbw6EXsJznS8YY/IQOht3p8rvfogb2w25FlAwcJ8mFeQC3eeLQggK3tXRIa2ekE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718025523; c=relaxed/simple; bh=9jIKbtpuTldIb1KNuS2YUa/uTjVOcsW6Ey2tzNwRWYU=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=b4rLXJYm+/AoDQRpxLajZhOD3D5tlIqMPbeKr/pDL5DhypZjYSnLIVijtc2AIWciu4UWY3jW1QTjRKh/pnf+j/SHSwa1NUFLV4LIql8IsISNAI1ONxZifgVPiPUhwec079XFPvuxMPxnsEsida/R57sazmxGhbp/R0vY89aQPcI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=UlasUtKv; arc=none smtp.client-ip=117.135.210.2 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:MIME-Version:Subject:From: Content-Type; bh=/xi9sq9viF3AhnFJOXABtAS7QK7RPNhmxpE7hgLtAOQ=; b=UlasUtKvb3Ri0b7eR6EMN5LE7e/iJgQlkpTCCT88sFwK+xQ6OMSr25TJNS9wbz PfJ7jdPZEW8su3rlrJYkFO66zh9rWWFgbAblGmf2eMNPTINirDkITsnRu+jrEQJD XAeFit9BI9lY4jxnPsrJsCubMB+CtH/N0oRKu7kNJOuSE= Received: from [192.168.1.26] (unknown [183.195.6.47]) by gzga-smtp-mta-g3-4 (Coremail) with SMTP id _____wDn1xjW_GZmV+MMDQ--.32004S2; Mon, 10 Jun 2024 21:17:11 +0800 (CST) Message-ID: Date: Mon, 10 Jun 2024 21:17:10 +0800 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] Bluetooth: qca: Fix BT enable failure again for QCA6390 after warm reboot From: Lk Sii To: Krzysztof Kozlowski , Zijun Hu , luiz.dentz@gmail.com, luiz.von.dentz@intel.com, marcel@holtmann.org Cc: linux-bluetooth@vger.kernel.org, wt@penguintechs.org, regressions@lists.linux.dev, pmenzel@molgen.mpg.de, stable@vger.kernel.org References: <1715866294-1549-1-git-send-email-quic_zijuhu@quicinc.com> <7927abbe-3395-4a53-9eed-7b4204d57df5@linaro.org> <29333872-4ff2-4f4e-8166-4c847c7605c1@163.com> <5df56d58-309a-4ff1-9a41-818a3f114bbb@linaro.org> <0618805b-2f7a-473d-b9fb-aea39a1ef659@163.com> <3d27add1-782c-4c19-9d84-d0074113c7a2@linaro.org> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CM-TRANSID:_____wDn1xjW_GZmV+MMDQ--.32004S2 X-Coremail-Antispam: 1Uf129KBjvJXoW3Jw1rWr1UJw4DXrW5ZF4UXFb_yoW3JFWrpF WUJF1Dtr4UJryFyr10yr1xKFyjywnrtr18Wrn8GrWUJa90vF1rJr4Iqr45uF98urWxWF1j vw4DXasFvr1DAaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07U5nY7UUUUU= X-CM-SenderInfo: 5onb2xrl6rljoofrz/1tbishv5NWVODlqgtAAAsO On 2024/6/6 20:54, Lk Sii wrote: > > > On 2024/6/5 15:14, Krzysztof Kozlowski wrote: >> On 05/06/2024 03:49, Lk Sii wrote: >>> >>> >>> On 2024/6/4 23:18, Krzysztof Kozlowski wrote: >>>> On 04/06/2024 16:25, Lk Sii wrote: >>>>> >>>>> >>>>> On 2024/5/22 00:02, Krzysztof Kozlowski wrote: >>>>>> On 16/05/2024 15:31, Zijun Hu wrote: >>>>>>> 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() >>>>>>> by adding condition to avoid the serdev is flushed or wrote after closed >>>>>>> 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 fixed by >>>>>>> this change since the serdev is still opened before it is flushed or wrote. >>>>>>> >>>>>>> Verified by the reported machine Dell XPS 13 9310 laptop over below two >>>>>>> kernel commits: >>>>>> >>>>>> I don't understand how does it solve my question. I asked you: on which >>>>>> hardware did you, not the reporter, test? >>>>>> It seems Zijun did NOT perform any tests obviously. >>>>> All these tests were performed by reporter Wren with her machine >>>>> "Dell XPS 13 9310 laptop". >>>> >>>> Wren != Zijun. >>>> >>>>> >>>>> From previous discussion, it seems she have tested this change >>>>> several times with positive results over different trees with her >>>>> machine. i noticed she given you reply for your questions within >>>>> below v1 discussion link as following: >>>>> >>>>> Here are v1 discussion link. >>>>> https://lore.kernel.org/linux-bluetooth/d553edef-c1a4-4d52-a892-715549d31ebe@163.com/T/#m7371df555fd58ba215d0da63055134126a43c460 >>>>> >>>>> Here are Krzysztof's questions. >>>>> "I asked already *two times*: >>>>> 1. On which kernel did you test it? >>>>> 2. On which hardware did you test it?" >>>>> >>>>> Here are Wren's reply for Krzysztof's questions >>>>> "I thought I had already chimed in with this information. I am using a >>>>> Dell XPS 13 9310. It's the only hardware I have access to. I can say >>>>> that the fix seems to work as advertised in that it fixes the warm boot >>>>> issue I have been experiencing." >>>> >>>> I asked Zijun, not Wren. I believe all this is tested or done by >>>> Qualcomm on some other kernel, so that's my question. >>>> >>> Zijun is the only guy from Qualcomm who ever joined our discussion, >>> he ever said he belongs to Bluetooth team, so let us suppose the term >>> "Qualcomm" you mentioned above is Zijun. >>> >>> from discussion history. in fact, ALL these tests were performed by >>> reporter Wren instead of Zijun, and there are also NOT Zijun's Tested-by >>> tag, so what you believe above is wrong in my opinion. >> >> Patch author is supposed to test the code. Are you implying that >> Qualcomm Bluetooth team cannot test the patch on any of Qualcomm >> Bluetooth devices? >> > i guess Zijun did not test the patch on himself based on below reasons: > 1) the patch has been tested by reporter with report's machine. > 2) perhaps, Zijun is confident about his patch based on his experience. > 3) perhaps, it is difficult for Zijun to find a suitable machine to > perform tests, and test machines must have QCA6390 *embedded* and use > Bluez solution. > >>> >>> Only Zijun and reporter were involved during those early debugging days, >>> Zijun shared changes for reporter to verify with reporter's machine, >>> then Zijun posted his fixes after debugging and verification were done. >>> >>>> That's important because Wren did not test particular scenarios, like >>>> PREEMPT_RT or RB5 hardware, but Zijun is claiming problems are solved. >>>> Maybe indeed solved, but if takes one month and still not answer which >>>> kernel you are using, then I am sure: this was nowhere tested by Zijun >>>> on the hardware and on the kernel the Qualcomm wants it to be. >>>> >>>>> >>>>>>> commit e00fc2700a3f ("Bluetooth: btusb: Fix triggering coredump >>>>>>> implementation for QCA") of bluetooth-next tree. >>>>>>> commit b23d98d46d28 ("Bluetooth: btusb: Fix triggering coredump >>>>>>> implementation for QCA") of linus mainline tree. >>>>>> >>>>>> ? Same commit with different hashes? No, it looks like you are working >>>>>> on some downstream tree with cherry picks. >>>>>> >>>>> From Zijun's commit message, for the same commit, it seems >>>>> bluetooth-next tree has different hashes as linus tree. >>>>> not sure if this scenario is normal during some time window. >>>>>> No, test it on mainline and answer finally, after *five* tries, which >>>>>> kernel and which hardware did you use for testing this. >>>>>> >>>>>> >>>>> it seems there are two issues mentioned with Zijun's commit message. >>>>> regression issue A: BT enable failure after warm reboot. >>>>> issue B: use-after-free issue, namely, kernel crash. >>>>> >>>>> @Krzysztof >>>>> which issue to test based on your concerns with mainline tree? >>>> >>>> No one tested this on non-laptop platform. Wren did not, which is fine. >>>> Qualcomm should, but since they avoid any talks about it for so long >>>> (plus pushy comments during review, re-spinning v1 suggesting entire >>>> discussion is gone), I do not trust their statements at all. >>>> >>> >>> For issue A: >>> reporter's tests are enough in my opinion. >>> Zijun ever said that "he known the root cause and this fix logic was >>> introduced from the very beginning when he saw reporter's issue >>> description" by below link: >>> https://lore.kernel.org/lkml/1d0878e0-d138-4de2-86b8-326ab9ebde3f@quicinc.com/ >>> >>>> So really, did anything test it on any Qualcomm embedded platform? >>>> Anyone tested the actual race visible with PREEMPT_RT? >>>> For issue B, it was originally fixed and verified by you, >>> it is obvious for the root cause and current fix solution after >>> our discussion. >>> >>> luzi also ever tried to ask you if you have a chance to verify issue B >>> with your machine for this change. >> >> I tried, but my setup is incomplete since ~half a year and will remain >> probably for another short time, depending on ongoing work on power >> sequencing. Therefore I cannot test whether anything improves or >> deteriorates regarding this patch. >> >>> >>>> Why Zijun cannot provide answer on which kernel was it tested? Why the >>>> hardware cannot be mentioned? >>>> >>> i believe zijun never perform any tests for these two issues as >>> explained above. >> >> yeah, and that was worrying me. >> > Only RB5 has QCA6390 *embedded* among DTS of mainline kernel, but we > can't have a RB5 to test. > > Don't worry about due to below points: > 1) Reporter have tested it with her machine > 2) issue B and relevant fix is obvious after discussion. > I believe we have had too much discussion for this simple change. @Krzysztof do you have any other concerns? thanks >> Best regards, >> Krzysztof >