Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2192023lqt; Mon, 22 Apr 2024 04:25:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWeV/8WwvM0J06JfYum5FyT29Xb8iOxrLXCeJzHzRrLncBLqEAJjWtNwXg8hWU+neVZeb684296Nd1476J7s7Qb2aKObPSa7m7rRWCLEg== X-Google-Smtp-Source: AGHT+IGYphBqB5n56LTDenZM/7ejFjoqZN1/l8sbXaScSFsgsQRepnSEgRxOudVUavxHr6d3jFxt X-Received: by 2002:a05:620a:2a0b:b0:790:7aa9:69ef with SMTP id o11-20020a05620a2a0b00b007907aa969efmr1284867qkp.15.1713785144253; Mon, 22 Apr 2024 04:25:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713785144; cv=pass; d=google.com; s=arc-20160816; b=A9FuGGD3vGVHLSQMzX1PPJHwLEmRbjM1umebuL9ZwnTZfMPIb3ZANc1gAJz9zVSEI7 oDTgV7eHn2bE2AX1SMx4gbqyCN0uDEBN2PxTtY3ibXw+yf9FqPbyRuDDq8fz9Ckazenc GGaa+zOYmsRlN3ecRnOMwIzexish5kbwY+vh/7TZLxkloENCYqeeJjfxuPybGsjDqY1z ij0WJUNRKHlzMKJRsQZJ/JwvgY3GgqYPID1fwfzpZN/Q5Hpq2IFXkPqm/DEzh50jjPzx kz+7nDWhB3989WGeua8udcjqz0y9lx88JUYLH3M7sBQIeA2kg1Egyzgcs4eT2TAyU70X 3aBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=NPBMpPfIcMcS6UBtC3uaHZr+ggmmAMSiArb1Bh8gW6M=; fh=9AeQCCczayS8HQi4eWcaab/mj/A+cIGPx+yRrJoRNg8=; b=XhWo4qBJ2ltMSHOPJntktyhnyeRx9hSGpLVNp3I5oJdulgay5IMvqa27OeX9c9VCQL jfE8Rb5TbBCaP9HIMf/5X7RQrQk/qC03E84O1fjx4atMVG0TiYzZVFGlLKPhCW26Zwty Me7mZ5crXfVrf1HyWEq8nVghCaAO3MMKehjwExv1QGJMHrgGESldftUt48iA7lqOPYk/ HIfK4TiHVewcINmeVbMreBKZPq49Ia8BWmw7Rab/rYQOMEuU+nH/tY5dFx9NrExIWl+q 54eEv+Ql3fKiAtp+LxWQcCOVbHD8E2DTnXEmVr5Fsn/qgiUXLeVoH8HULyQMPqRf9N0G Z9oA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="FQx/1GR6"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3852-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u19-20020a05620a023300b0078a5fc2adf0si9969669qkm.138.2024.04.22.04.25.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 04:25:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="FQx/1GR6"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3852-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id EE0ED1C2269C for ; Mon, 22 Apr 2024 11:25:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58A341465BB; Mon, 22 Apr 2024 11:25:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="FQx/1GR6" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 874AC14658A for ; Mon, 22 Apr 2024 11:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713785136; cv=none; b=fAfDHmO3zVhut+Q8utwNH7I5d/jMkgA53eSGnWtxp81wfUvvoMonNa2efAsqSFQqBaD/qPnEBlF23Uxjbg8UTCIzsqw7hBxDzXIQts5cYgLBVktrY9FQ1CcIOX5/161O9hEDmrtffowQRaOWlLsnxqc60ApfVH5sXBkavYZTKN8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713785136; c=relaxed/simple; bh=6Ek475WwciTCayxC7hTVryHZ9ciAMChJIzEQhexou8c=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=FgTAaw9k0M7rSkIk9MMJMirYi5dmU2z1c+R7kOXelzGrs5xroxJVjgsvOV4t1Y6Wx0qxQOkzvX4Z1Rmo7sEROjcaHcb8V0zu1auZMJSzChFwr0AmFW7ojEIDKGkhYLhsS+QWKsgWJVtwBhfRtU1Gf6BsLnlfurcrAnIHBhFzHNo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=FQx/1GR6; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43M25eCM027623; Mon, 22 Apr 2024 11:25:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=NPBMpPfIcMcS6UBtC3uaHZr+ggmmAMSiArb1Bh8gW6M=; b=FQ x/1GR664wERmwMauO2XgV4ZZUmBPQKVCpXPy91Tq3dbnVTqZX/BGHDTz2E9iII0y rU9zavLsS4Tbv7n7JxKF/eVOvPqnCGivYC8mn60aggtjidMdo10o8vnarapleyvR llIxDgLfploACqb+5f/ihWuU03vzp54FBCK3wpqw2GVIW8KBA2iCewj+RoaazdNP 7W2Tp9jWjiTNM63J1pOhX0Zxpsl9Twwwn6aBWkk8p8Q5YFPfNbGJVPO66TeUPC4y CFMLlynT+/tB0cleKwyhV89ki0M9XyZe8WMIjEQfgBJHb3OfL1rSRk8H5wG0fNnb 4Fn/SAF5JNBOxoXZgCYg== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xnet794cy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 11:25:27 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43MBPQXm030547 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 11:25:26 GMT Received: from [10.253.37.80] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 22 Apr 2024 04:25:24 -0700 Message-ID: <930736f3-696c-4076-93fb-d879691bac66@quicinc.com> Date: Mon, 22 Apr 2024 19:25:22 +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 v5 2/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 after disable then warm reboot To: Krzysztof Kozlowski , , , CC: , , , References: <1713650800-29741-1-git-send-email-quic_zijuhu@quicinc.com> <1713771497-5733-1-git-send-email-quic_zijuhu@quicinc.com> <1713771497-5733-3-git-send-email-quic_zijuhu@quicinc.com> Content-Language: en-US From: quic_zijuhu In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: iKZPNFHNsp_-b65oXtW_0ZlJJ0fJXEBo X-Proofpoint-ORIG-GUID: iKZPNFHNsp_-b65oXtW_0ZlJJ0fJXEBo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-22_09,2024-04-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=561 suspectscore=0 spamscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404220052 On 4/22/2024 3:42 PM, Krzysztof Kozlowski wrote: > On 22/04/2024 09:38, Zijun Hu wrote: >> From: Zijun Hu >> >> 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 QCA_QCA6390. >> >> The commit is to fix a use-after-free issue within qca_serdev_shutdown() >> during reboot, but also introduces this new 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 > > NAK. This is way too much. Previous discussion is going, I asked there > questions and before any answers happen, you keep sending new version. > This leads to previous discussion gone/missed. > > You ignored several questions and feedbacks. > > Best regards, > Krzysztof > i believe my commit message explains WHAT/WHY/HOW about this issue. 1) the qca_serdev_shutdown() was introduced by my below commit Commit 7e7bbddd029b ("Bluetooth: hci_qca: Fix qca6390 enable failure after warm reboot") 2) then Krzysztof's below commit was made to fix use-after-free issue but also causes discussed regression issue. Commit 0b7015132878 ("Bluetooth: btusb: mediatek: add MediaTek devcoredump support") 3) my fix will solve both this issue and the use-after-free issue.