Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp114044lqt; Thu, 18 Apr 2024 09:48:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCUWrZID9hR3kWD7RBCCNdC/2z7APB7+pwQZrXH+xaremsJujx47QVJncodL3b7T8qdqSxQTnTDkam1zH9cdYRNHNs1h5ie9JB4HG01g== X-Google-Smtp-Source: AGHT+IE8qDmXxL5ire5OTd3Qfx+S+EYFQZjI62TWBf6srhkDY0lKPkoZwlvF8nrLoHgsl3uo0gEM X-Received: by 2002:a17:907:104b:b0:a55:201f:75a with SMTP id oy11-20020a170907104b00b00a55201f075amr2092728ejb.33.1713458921224; Thu, 18 Apr 2024 09:48:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713458921; cv=pass; d=google.com; s=arc-20160816; b=fO44w5ek/ZhG/oW/9DRsCYyxohM/rgEQTyuP7dpQ/q9c4mfuUCcEaUUn+8cUaIA0H5 fofMkq9dOeiC9td2aIM1MJbqAzLkNcD4GyeI5O03KrBX7lnSaCQD6pgx05A6i+CfPTmq bOZZ5qHDMA1CcTRci3W60nJn/fY4F8CO2N77PeXEhkV7ttkZpTwQZuTL8dJNCA2ewhsn gMKuTEyVx6aM13hUXuFXZuQHSKCryXVgcaWDFfsiU0f0IEN4+2zofqurEfIXkT5rFoDx vWu6yqgQrwdaAdDtG48YCp4mWdMNfg6cCTp4189lmCvtJAoWaQ/HUUMCNYt1NueBJeDB ma2A== 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:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=OiORiyssq7YqrTfGhe1DiGEY15EnNy5QpykwSel4qwY=; fh=PLpl6wCUMDL5Kl6GRkMNbscxz0b/WHhRpqfjyjisbH0=; b=p6eqXMfOx5iVlJZn8ldo6sa/wRlPrAYu/2pRGRYrZjywvHSjUtaBnY5eh0QzvmR4Mb 0zExAEyfKGTblsWSbFXFUwrFZ7v4kRls9U6era7Vl+qqQIoiSj3fjK+/URyLoGMD489W hCXj5tjzWBHcEPSZcZzUQyp2klssQm2L3zn/nwiM4rk/u5UAUl9SOgDQ6u+/4/TQfD4w /FxXLNZKXc9/QazoOe3QY3SBKGhE2I2C3SZMBwbLSlIhZxhpJ1GzZeyInywSYFcEwNEN Xprc/92SMMCRpjQUx2fr458YMXtlWNuFaz3qBIJw/iLW7NIRT91Qvi3OH/L6JAmuXhmd jM4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="L/BJMhLE"; 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-3734-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3734-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 kj28-20020a170907765c00b00a5227c7af0esi1061385ejc.341.2024.04.18.09.48.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 09:48:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3734-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="L/BJMhLE"; 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-3734-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3734-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 87AB51F22CA3 for ; Thu, 18 Apr 2024 16:48:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E747D171085; Thu, 18 Apr 2024 16:48:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="L/BJMhLE" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (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 B3D83156F54 for ; Thu, 18 Apr 2024 16:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713458913; cv=none; b=sKMBctTtBwKp/1h0Y2Spb7Lyzqp6lXKpExYIKvExgjsRHRWyGTz1/G/1tnQuheL4Nd1GQGc2euFkY7V2rZ8bNKC4g36w4+0WEK4T8gkUEWsb46xt+n4gMNKeq2iJr4/LI7eO0VfaJE/nrDSeoE+RAU5SWuuJ7xiaULOYRwruoa0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713458913; c=relaxed/simple; bh=SvMQzPR50Q6fRooCmikulloJR3sykjF8Zk6yrUNj/bc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LP2e/L4cBEMSgAgIq0lgx4FuGmswjaMgpow87uocdSKDsz6EoRYFOChZ+WhjOq8EMdoCudKuPNITL6ESTu4jlMHcDG9YT9IUfrnpPjzRBH2Z4g3XciBoC4rtak/vlUikMrjPOQYX4EE0/ZvYH6YdRxjfSAUmNk07CCgb4UE0aRM= 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=L/BJMhLE; arc=none smtp.client-ip=209.85.210.182 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-pf1-f182.google.com with SMTP id d2e1a72fcca58-6f043f9e6d7so1130163b3a.3 for ; Thu, 18 Apr 2024 09:48:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713458911; x=1714063711; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=OiORiyssq7YqrTfGhe1DiGEY15EnNy5QpykwSel4qwY=; b=L/BJMhLEkdduY3+FxvlUSleaDQdq8l+eCNTcxArwesJQruV2wnT9v7ZxpDNP4xgQ4E OMa76j6J1Cz6YU5DlBXrKlAlcAnQbSAyIcJ7/3DL6Vw3W0jXLbVcAm3NP7RDQndhnzWe 0kXdkbIKJKKadkbEwsqs5PPluXWAPRfAP9LCMOtWw9wb2jHuofLQdGxRGrLCPKkyq+Y6 1B/7+d9LCagpcF8C+oOnBfVj2k4Lh5qHr0GZALpa5zdN44S76cjEKqtnFmTfq4fE1QpS D57+T0pmbV3tEOGj1VZ6DhoMKkj/k1nvV5R7d/ZBiqnfp9C3Fl5Fi9FLfb8Tp0YMah4B 8VkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713458911; x=1714063711; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language: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=OiORiyssq7YqrTfGhe1DiGEY15EnNy5QpykwSel4qwY=; b=GMLm5LWCJrtaleVVkbHIqYoIbNL9mgG/zh8oOzgITmUCXtOirrV/c4Vv9tgB4twGpm 6652Jkabqr63hD8YcGxcVhgkwGsZHQ1nXTl/Q6qvAGE0gYoez8gwVgkd3NlooDuaUSMz dPnmfFX2h/4jWaUYwXEChom8s5Y+0WqYbnHPCAQtgmtsXrRYlzkxm6QL0pOF1CeFRK// NbvhpEwsjNGUzxt1VCJ6Og7Nn1iTXyw/ykBCO1SdBUxH3PZXqEFnrmBKiiKLdjurLYhq JpDHLxOfUde+MMKZMOW3tZSf9GQ7TLKOni2hGQCDus5l1H1QMHYLidN/pXSeficMvwpA de1A== X-Gm-Message-State: AOJu0YxmOORqIuVPUWhD0w3vxb8fcdpVfZPiJJVanpBQsSZaIwWOFXyd i9GoM0iZEpLgWmbLe4G2NVKBelKi7Ti/mqsC00loRjDDumFMphXb0UCKctxlYZQ= X-Received: by 2002:a05:6a00:4fcc:b0:6ec:fa34:34b6 with SMTP id le12-20020a056a004fcc00b006ecfa3434b6mr4986566pfb.13.1713458910979; Thu, 18 Apr 2024 09:48:30 -0700 (PDT) Received: from [10.36.51.174] ([24.75.208.148]) by smtp.gmail.com with ESMTPSA id ff3-20020a056a002f4300b006eab6f3d8a9sm1690428pfb.207.2024.04.18.09.48.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Apr 2024 09:48:30 -0700 (PDT) Message-ID: <7cd6f395-1f1b-4a73-840f-d70fff5da220@linaro.org> Date: Thu, 18 Apr 2024 18:48:29 +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 v1 2/2] Bluetooth: qca: Fix BT enable failure for QCA_QCA6390 after disable then warm reboot To: Zijun Hu , luiz.dentz@gmail.com, luiz.von.dentz@intel.com, marcel@holtmann.org Cc: linux-bluetooth@vger.kernel.org, wt@penguintechs.org, bartosz.golaszewski@linaro.org References: <1713449192-25926-1-git-send-email-quic_zijuhu@quicinc.com> <1713449192-25926-3-git-send-email-quic_zijuhu@quicinc.com> Content-Language: en-US From: Krzysztof Kozlowski 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: <1713449192-25926-3-git-send-email-quic_zijuhu@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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? > > 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. > + 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? Best regards, Krzysztof