Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp895994lqp; Sun, 14 Apr 2024 04:57:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVVTr9Mw/He0eCUCa0QNmijgdqyrikFuIsL7Ul0Sk8BWVtqmugP0rZQjWbtMmSd4o7YL1ytx0xwRaIjRJ8yRRuDuqqRTUvpChkK5tdnVg== X-Google-Smtp-Source: AGHT+IEgq9sUuCR5/m21jc+V5uCBksuGoa2pcRoujPeHEAkgnxx6Yadtxg0ea2k8qGNWYAYn6TWT X-Received: by 2002:a05:6358:2889:b0:17c:1b9b:bf46 with SMTP id n9-20020a056358288900b0017c1b9bbf46mr7564147rwb.13.1713095852997; Sun, 14 Apr 2024 04:57:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713095852; cv=pass; d=google.com; s=arc-20160816; b=BPrTgfH/YJV9s0Y2sLLnqPWC7To2+MC6NS3IP2R1n3Pvyb6G4lZlP1eb2gxhlLHS3+ 3cm9zPCFXd1RfccbX6lMVxj5npPCHsmp5oH+I3Ng5VpJuHj+nomHCO15TRj1OarPShYA R8sCYDJaMZNh5XECN6Zp7uf8j2c8Q9mIJPjfyC/dQm0+fUPe42yQKzKKsbk91y57wwVW 8O2a1TOO3rvExrhpG6lKAA8LyR6Hlt57QgTLUxbYSkYKF5TqlrEBG/OMwHq7sfyDVrfr 3eo7aOOv/Wx3pfs4MlN5D4D95ZRMEysAFCBctZm/Oj+G9NY3oXmw5iLjIs7bNSFj02Rp /1zQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SpQ1Sh1daCr9mnGe/dXNGgJQA6ioZ7iyNQIKuwgkLiQ=; fh=5kgnzsAnrC4CZX4KITz5GwVY/syc43MMF+6YQwUvf2Q=; b=CR6QLpqT5lzmS6M7vC8h4SHuMuzfHvF7zjBXeu8O3QfRaAFP0/mUN0xFXkTosBoF3h 0HnufZ/MFdpPHMsSdKuyb6jUTB6+JqvQZJu8NTAaiYEcAmTMFNN8KnsLegtPCgnfcAFL vfDGaivgN9IqUAp2vq5nlvvI4EC4ZvhGtUTJ00g/pvyt1k7+xTtzo2thFS4wAH8c8n+n VHJKe3iMnvYeVEz/90mx4YnX6QuK7Woe7MLMbdLRjxiOEfH9J80MABpJBhpuBnZMasDX ZFTfDp6aJS+mQKa26BsxoOxDCKncLh4q3/29cyUyhi2H7AzWnqV7MvF9MBt0G4JUQtMy /o3A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oHAlI5bA; 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-3553-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3553-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. [147.75.48.161]) by mx.google.com with ESMTPS id pi1-20020a17090b1e4100b002a85806f6e1si378333pjb.172.2024.04.14.04.57.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 04:57:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3553-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oHAlI5bA; 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-3553-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3553-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 138F4B2132C for ; Sun, 14 Apr 2024 11:57:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D5B93BB32; Sun, 14 Apr 2024 11:57:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="oHAlI5bA" 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 0284B23763 for ; Sun, 14 Apr 2024 11:57:20 +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=1713095842; cv=none; b=Oe0yIwuxygyqCpxAbdJ0Rgr7NsG4mT9Jvf+ilM7YwPU730YYkZPaYb03xH4FzD103JIJLwXxu+5XKXDRORS27E56J2hjUYqUcO53/9rRwqoziD8Pld8oj1p3P/6vt+l4+v/A26YWhJhS4ay5SV5+R2BOkkIbO5PUnPvJ3hm+U40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713095842; c=relaxed/simple; bh=ghSKYWP5x0FlYPCZCZwNLjQwzg/OtUN7guLUs9gpl9o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RrOGJgyqZKWRmrtd773zD2kjBnuAZyxSG9ddfScD3U5xPBPkY8ARRarnExeSRAEU31hxfeyp21ZzHCM80H2KGJV9WCVKKPBT9Uznrs/ZLK8c7v4bcyLHeKCEkDAWfFiY/6G5y7MJWjS0qU+12RKu+NVmxRpZdDn3fAA6PFHtqeU= 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=oHAlI5bA; 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 (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43EBroLJ014940; Sun, 14 Apr 2024 11:57:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=SpQ1Sh1daCr9mnGe/dXN GgJQA6ioZ7iyNQIKuwgkLiQ=; b=oHAlI5bAMAoYNpvHTNTrlw6H3sU4aAvXrepg BIi4+nnErFa2kHGoz629XzJcTeV0QjSsOOintKvQ6wVz1/59J/oG/oILlXT+6Icd IqJLVFDB3k3OdfGdLRoaJN+QzSIDQ+2Ck9BtFLiVDL8b4KFCmItrkII9M1ZJQvXN ymL3sagwSSeNa7yqxudbATZx7cxA81x0MwKXxs6aunFpmF3SkpQHB5t/4+fy8+aP kfzvY9SXz7Gg1Ft0hvwK4370SGXaBdU7UnGUcsR5DbGHoxwetWWYLfqpqQFX/gCd soKUSC/qZ0F3Q8zGdBIpDF1XVpXQcIrtaSg/avV2p4+6UqVRhA== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xfhcnhu7j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 14 Apr 2024 11:57:18 +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 43EBvHkX015840 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 14 Apr 2024 11:57:17 GMT Received: from zijuhu-gv.qualcomm.com (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; Sun, 14 Apr 2024 04:57:16 -0700 From: Zijun Hu To: , CC: , Zijun Hu Subject: [PATCH v1 2/2] Bluetooth: qca: Fix QCA6390 enable failure after reboot or disable Date: Sun, 14 Apr 2024 19:57:05 +0800 Message-ID: <1713095825-4954-3-git-send-email-quic_zijuhu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1713095825-4954-1-git-send-email-quic_zijuhu@quicinc.com> References: <1713095825-4954-1-git-send-email-quic_zijuhu@quicinc.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: DDPJJShc53vM0fl6Fod02IDX89s5C_Mx X-Proofpoint-ORIG-GUID: DDPJJShc53vM0fl6Fod02IDX89s5C_Mx 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-14_02,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 mlxlogscore=999 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404140086 Fix QCA6390 enable failure after reboot or disable. Signed-off-by: Zijun Hu --- drivers/bluetooth/hci_qca.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index b61ca9828284..d390d68a831a 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -2499,14 +2499,19 @@ 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("%s: Don't need to send EDL_RESET_REQ", __func__); return; + } + + if (hci_dev_test_flag(hdev, HCI_SETUP)) { + BT_INFO("%s: Don't send EDL_RESET_REQ due to NOT setup ", __func__); + return; + } BT_INFO("%s: Start to send EDL_RESET_REQ", __func__); serdev_device_write_flush(serdev); -- 2.7.4