Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp178173lqb; Tue, 4 Jun 2024 08:18:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVL/pctt4KdG7dymWKLw6flC46+HKyeqSm+Fc/aTzVJFR4eZvcMyVID6ip8se70EHJBiJFqjvo6Gwoc9uK5AX3QF0x0vvO4tXouLBMqxA== X-Google-Smtp-Source: AGHT+IFBvgTqPFAJcjPXRDiA5OaYZNibCAaK528qG9R2oDWEtvS5wdrLhM5D/TpTrFv8kOc8BmcR X-Received: by 2002:a17:906:2855:b0:a68:a2e7:118b with SMTP id a640c23a62f3a-a68a2e7230bmr634854766b.19.1717514318049; Tue, 04 Jun 2024 08:18:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717514318; cv=pass; d=google.com; s=arc-20160816; b=lscUBMcslEoJjFYUEOCLoRVwh3CtsWNUf1+DK2WJLHNnt1ZhigOR7zFMQvdRWM7ADi wYYVH/m4rW7lttStU9J2ykEbCKO/NS/S+kucAbp65BXuIzSvLwrFQDnD3btrVsShLBip MtPNAlg/U45D+eAYXzexCRLt0F9zF+y2I7/aD9AlTdPPChfrjXmvLj7+San88zOQrBwl a/mBEU433OGyCE1Qrv2S/mUjZ3kBTiIfeARXu1pe22owI+QaeruqYR3Awyjo2ITBGZW/ fN9MIbJ/2LNUxlywZe3DyM+C9r/ZXcPZXhIenqcLrbYqyvGT+a1dOyvYN/iqUZE7OOLp s+wA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=q7+W12LHNNKeJ12SxV/raTxnYzwkfZ51YG937pmX9Sc=; fh=/T6d7Kb30ChvKyvd5IY5tgrp6lqJTEBQOcEUscWQHXU=; b=e17UnOzm7pR/4Sv85v6JMc0DO7kd8VUjeZjwItqoQGwbBjvQIKDY3dazdZtN+Q6vyt pS+a+lbxBqoJ2HBNmN7wsi+mCrfv1AVCn3bKS570qifS2my7hFEO8HwS1DwuhNJ7LUr2 8njnlSbTnaRegvnqlclQduDpprOwByv/WxzXRBLaeclU6v3U3TgE5dVZsSZasduoVzAH kmNBBGMo/04kyNNYy+ba21ue5fI+JLbTB5/Cy1Wbtn2ZiR38WdTKXTcgauIP4W1Agkl8 mQlwAK1ws37NZg3/6Zjpgbo3KvjBhP2rZdC6xiwjHJeeK+9ZSBK4EB4bdXD9M8AVeVcR Z4BA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bgQxKllV; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-bluetooth+bounces-5111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a68f5547492si260252966b.81.2024.06.04.08.18.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 08:18:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bgQxKllV; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-bluetooth+bounces-5111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 9A8F51F2211B for ; Tue, 4 Jun 2024 15:18:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF5F3143890; Tue, 4 Jun 2024 15:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bgQxKllV" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79F9413A3F7 for ; Tue, 4 Jun 2024 15:18:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717514309; cv=none; b=afCt85eP5yaYv4WDcjoAwbzdB5kvSg+EHPVx+oolzUobOuQHXRtSjHELdle05T8n3zbjCxrMOGw01UCagbke609K1idmlqOY/Ux4zG5J5qDDdGWI2UbScSi8H3Z4iAvbumorKE8VEmGcgUFehDp9tSM53OIV/7mh/ovzbgwt564= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717514309; c=relaxed/simple; bh=IL2NFnAeJpLpM01ZZJPLHgoIoMbhXPx6dZ9bJfFZhwY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iY/nBfimP8lZ8TnyuTrXdTjOwWdpI4243B+LU+ryxaaeyDJCwwQeKvWjtlkVtioIdogMOqW2OCVYRNKQzUfOaqT1UjN2qh5TH/uVmC2ynNovVu+zCLPLKKCtdSqdGYYdmVeWqtgYqizWHceYY/tZN+2BW4YsxeDszTBrT7+86z4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bgQxKllV; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-35e0eb3efd0so1055883f8f.0 for ; Tue, 04 Jun 2024 08:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717514306; x=1718119106; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=q7+W12LHNNKeJ12SxV/raTxnYzwkfZ51YG937pmX9Sc=; b=bgQxKllVLjlcUOA4Xfb0za7WwEDpIsXyHqwTVsJRnipLrrfEr8BeBY8FdZMtAPOC4Y UofNu5w5MUcQD5a7EaEatD59JWPhfpCEwmuhy7C0mRAXg0nkvMh4nzZw+peUhLDVhDdb HXzuOSJb/JAFGT/URb5KwqAM+IVExNbGvHXRLwm628nGwYF/i/dwVWo8ZcttG3XjUa6y fs38UNiXyxlfBXiyNI9UO41dKk0aVz71C73IFo8PmwKtv0JcJ+XunGyml6ZgFmn0kDI2 BzaLfOw7vQf/bBQAv2z1kE88N/NwOcLyKbnI2YdpzqnJidvff/tEAclc9vLanLz3GZG+ jFiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717514306; x=1718119106; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q7+W12LHNNKeJ12SxV/raTxnYzwkfZ51YG937pmX9Sc=; b=ajeUjhhi8znBzSGoTbotny/Ha2ylu6AfQKReJfnaK1UCZsLX9600d00hrhy/4ag3J1 +sFJMgjwdODzAXp8MycJwYzMfo8TPtLrV3lafsHqBny+HBMjAmD+UpRzVcEQbTUE4mGB gGrDfvcJ33sN4O+mWUc+FuMzuIFjXyjZwGSHHqZbjbOX7ijDnI7S6YWifWha9jXjb5xF jt1No6q8xUgaRzxxnFLEFVtZNrs9i3Bam6odHz+uOYjzt5P1C5NQ+SY2e2GZT1N4+Z72 5UVeRDAPmbCtdccOIUJlFE2upSe1hS7DgLdUcHks1FR9/E3llSalu3a8qWLZIvNa5bUx PYaQ== X-Gm-Message-State: AOJu0Yz98K5C9m94hUxH6AmZDC7iaeFwKgqN2opWQDM5ZH4mK3bMnWvn +rdveZZgcAG14aUB2AD7dxwbG9EjKXCvJnar9FLK55GejLPa/mMT8qOI1Srju/8= X-Received: by 2002:adf:ee0b:0:b0:354:dfdb:f3e with SMTP id ffacd0b85a97d-35e0f25a556mr10343043f8f.1.1717514305814; Tue, 04 Jun 2024 08:18:25 -0700 (PDT) Received: from [192.168.2.24] ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd064ca96sm11937668f8f.107.2024.06.04.08.18.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jun 2024 08:18:25 -0700 (PDT) Message-ID: <5df56d58-309a-4ff1-9a41-818a3f114bbb@linaro.org> Date: Tue, 4 Jun 2024 17:18:23 +0200 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 To: Lk Sii , 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> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLc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AZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <29333872-4ff2-4f4e-8166-4c847c7605c1@163.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. 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. So really, did anything test it on any Qualcomm embedded platform? Anyone tested the actual race visible with PREEMPT_RT? Why Zijun cannot provide answer on which kernel was it tested? Why the hardware cannot be mentioned? Best regards, Krzysztof