Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp244165lqt; Thu, 18 Apr 2024 13:51:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUNGX5vyJ0DPcSKMNPuXLvPPV9W1IlEEqGZ65qnfYIdNCZLxwANOJfdhXQ6f4rq257mjnJSaGbcVH6Eq1JZNZKzj+1uMSMjU8Dd2O0M3Q== X-Google-Smtp-Source: AGHT+IEjk/fvBxeIsei+tzyekHMEnr8kbDeY7offcGqk8tCJbKndAqLNLjR4DIE/6Dt38CJH3Lpn X-Received: by 2002:a05:6a20:3c86:b0:1a9:90b8:1c13 with SMTP id b6-20020a056a203c8600b001a990b81c13mr504123pzj.12.1713473464659; Thu, 18 Apr 2024 13:51:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713473464; cv=pass; d=google.com; s=arc-20160816; b=Uz5EyfssXpsVWgavFmHg90V1Z3CbOMlIUAYJwlVvaJixLLEWVVnTvJ2Y5cFKu8tlRT y8hcCMBfN49zbaKBkBHLY5mNU1VR3PJa7q4swoUfoYT+osBRp9rBDzr8G4mWZ3QkBHLv aj1siRXsXIRtrq7yS5lx7tvmwXtWsbBsTTUDrUWb7Cwl+V6nfke5Q951CUDcW3uBgujj 0trnCGahEUNpg7MZaCg0Z5Hw34H07UbdAxnPQQx0YbkVzfM1dfKb88ERssAyCZxiNmhP 4p1MdRgYDcafngSXSH2igXADimKnYZggXXa0tUxeSZ+LpTlbq/222MY+Jb4pF0KOKTN3 YVUA== 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=bSOOhzXeLO0DS/P6KPCknfdyn2ALQY8xM75gr/qNgok=; fh=av5yu9jDpxzZMpv5e4yZ/R8xlqKX7haconVFGSC4QAA=; b=l1HJBb2m7Wza7h+1xqbKJbTJEtF5YHrks598/oyxbZz5QZ/csPEuSLvBl5S5W1Ewvq 6AfVjH8uVR+0FSp9y2Mfc1uwyYt5hSBKQskT1mKknsu15chWmnBsvxxkSzu8i/KhotNw PG96C95yLUfb7dVRhpNPTti7joDtXgY64L09/w0m9L6AhgaxH02gJ0aPgtWJcIX5g+hI Z86zLP6gdicwNE3NgtYphnYKc3KXH7FrmJ57M9dGG8xhE2vBZYSsPQ+hNVwTnOT6V9cn AcXY8M14fxVtaZbXlI3cT/DBEGlF4nt8S4EqsuEyyFMg3+7CRpUMPtCCrsV2RFwV9cQT 0YMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Lyyari9A; 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-3739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 v21-20020a056a00149500b006ea7f4aed70si2077420pfu.199.2024.04.18.13.51.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 13:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3739-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=@quicinc.com header.s=qcppdkim1 header.b=Lyyari9A; 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-3739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3739-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C43E9B21F3B for ; Thu, 18 Apr 2024 20:34:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1B1C181BB3; Thu, 18 Apr 2024 20:34:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Lyyari9A" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 E3E0D16C69F for ; Thu, 18 Apr 2024 20:34:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713472492; cv=none; b=O5UPiotg4XeSCOUyMMX2VgkoUHYUnErxmAXH7t6IQ3ayLaA98OXZm5+RoDjxQchNLkHHdz5CemQAIWt5BO/tPH+/9NXV+PT7sPrGftA8lB7NjJxy5c35xE+eymz7cj5xdUZCfihYUXSrPyx9fn01fI3oMOlJc/AJQeZjiXf35/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713472492; c=relaxed/simple; bh=zoE4923V0PsclUGsE4gf9VUBFNqe0bWDhW7lN2YUWUM=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=mxrqCRCnVD20J6gsFGs05wuFezPaSOCzhAiWIx0+hd/ITjC9QF/xaub9dLv8BfHAnTcYxB+CgnNcLy8JKaiAebGSZilicTmqIH4DrUfG1d16Sjo6S8o3//DEG7ARVAdqtEWhkZ3n7Yahg5+dUB1/Pie182X/rXo/Ix5PuW1v/mQ= 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=Lyyari9A; arc=none smtp.client-ip=205.220.180.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 (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43IK8tOu020366; Thu, 18 Apr 2024 20:34:43 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=bSOOhzXeLO0DS/P6KPCknfdyn2ALQY8xM75gr/qNgok=; b=Ly yari9AzXVZMReyUb/nuzvCixmYfKjJBPK3WBDvL0FObuOo7Pt3MUTSIrhMuMfgEc bx48R1bmtJszPv+90DQcWO0QNFmOUPYqqiXYuIBAA2DHl3movpw6xIZi/Pg4H73H nQYnjiInG77fw2ml30o8JQ02PZQ46iAz0jreDJxLvXRzmn886VgzpEGLuXMD+g0m lX7ecEgQ3jpZhfq5yX6ppB0wNFGsrf7MeFzmmla72SKZM1HTIqmF+I9Qp7ACKu34 6F7KSdNiixw9TcYXa1GDlA0W+qA0IsW+VehRtLcBWa/+08ah/1yOgwAwGmU1zJ2v VLrWCJVJ05pcKlDTy2sQ== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xka6rr200-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Apr 2024 20:34:43 +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 43IKYg2c008719 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Apr 2024 20:34:42 GMT Received: from [10.253.9.141] (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; Thu, 18 Apr 2024 13:34:39 -0700 Message-ID: <8751981b-3063-4228-bbec-f36bd544e0fb@quicinc.com> Date: Fri, 19 Apr 2024 04:34:37 +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 v1 2/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 after disable then warm reboot To: Krzysztof Kozlowski , , , CC: , , References: <1713449192-25926-1-git-send-email-quic_zijuhu@quicinc.com> <1713449192-25926-3-git-send-email-quic_zijuhu@quicinc.com> <7cd6f395-1f1b-4a73-840f-d70fff5da220@linaro.org> Content-Language: en-US From: quic_zijuhu In-Reply-To: <7cd6f395-1f1b-4a73-840f-d70fff5da220@linaro.org> 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-ORIG-GUID: SibjTcPWesfSKvnyNriCwAyasLaq1NOO X-Proofpoint-GUID: SibjTcPWesfSKvnyNriCwAyasLaq1NOO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-18_18,2024-04-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 impostorscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 malwarescore=0 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404180149 On 4/19/2024 12:48 AM, Krzysztof Kozlowski wrote: > On 18/04/2024 16:06, Zijun Hu wrote: >> From: Zijun Hu >> >> Commit 272970be3dab ("Bluetooth: hci_qca: Fix driver shutdown on closed >> serdev") will cause regression issue for QCA_QCA6390 if BT reset pin is >> not configured by DT or ACPI, the regression issue is that BT can't be >> enabled after disable then warm reboot, fixed by correcting conditions >> for sending the VSC reset controller within qca_serdev_shutdown(). > > I have trouble understanding what is the bug. Can you rephrase it? > Think about below sequences: cold reboot(power off then power on) -> Enable BT -> Disable BT -> Warm reboot -> Enable BT again ... BT is failed to be enabled after warm reboot. >> >> Fixes: 272970be3dab ("Bluetooth: hci_qca: Fix driver shutdown on closed serdev") >> Reported-by: Wren Turkal >> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218726 >> Signed-off-by: Zijun Hu >> Tested-by: Wren Turkal >> --- >> drivers/bluetooth/hci_qca.c | 12 +++++++++--- >> 1 file changed, 9 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c >> index 160175a23a49..2a47a60ecc25 100644 >> --- a/drivers/bluetooth/hci_qca.c >> +++ b/drivers/bluetooth/hci_qca.c >> @@ -2437,15 +2437,21 @@ static void qca_serdev_shutdown(struct device *dev) >> struct qca_serdev *qcadev = serdev_device_get_drvdata(serdev); >> struct hci_uart *hu = &qcadev->serdev_hu; >> struct hci_dev *hdev = hu->hdev; >> - struct qca_data *qca = hu->priv; >> const u8 ibs_wake_cmd[] = { 0xFD }; >> const u8 edl_reset_soc_cmd[] = { 0x01, 0x00, 0xFC, 0x01, 0x05 }; >> >> if (qcadev->btsoc_type == QCA_QCA6390) { >> - if (test_bit(QCA_BT_OFF, &qca->flags) || >> - !test_bit(HCI_RUNNING, &hdev->flags)) >> + if (test_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks)) { >> + BT_INFO("QCA do not need to send EDL_RESET_REQ"); >> return; >> + } >> + >> + if (hci_dev_test_flag(hdev, HCI_SETUP)) { > > Commit msg does not help me at all to understand why you are changing > the test bits. it is test bits not changing bits. > >> + BT_INFO("QCA do not send EDL_RESET_REQ"); >> + return; >> + } >> >> + BT_INFO("QCA start to send EDL_RESET_REQ"); > > Why debugging info is part of the fix? > they are reserved intentionally to print critical info. > Best regards, > Krzysztof >