Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp1175272lqt; Sat, 20 Apr 2024 04:07:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUXPDoAtBkbrBmHPkzQZ9I/M36NeTEzn7IfH3x02Rqv/c6f3Af4jUMCfRcpoRtT/9KG3baAVKJvTe0tLST5XCsNghZ5jUyLTiC3A9J6gw== X-Google-Smtp-Source: AGHT+IEaZXq7pBICzZEXA4/Gd0Atz2G1SOmTcjOoEVGs9vGF7V6nFXyWSJ08d5EfB3UjSaZbPYi9 X-Received: by 2002:a05:620a:5e0b:b0:78b:d447:4752 with SMTP id xz11-20020a05620a5e0b00b0078bd4474752mr5531793qkn.17.1713611257038; Sat, 20 Apr 2024 04:07:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713611257; cv=pass; d=google.com; s=arc-20160816; b=Pfi5na/PSh6nXzCwoE0yrQdVSlYjiRkW1bY+TPPSM4TjC1xEVMxDf5PB6gHBxPZJkt sz55PDzvRqcKJ90aMeRcl6XsoefyLRRYccDA1FbaC7CvsIq/L0pxkTlGunNHK07/Sjgu xb5ECbJHmFck9mPRN0+KqVd9s6oIlUw8advGTcUc9f/0gAlomGrtsQtHE8T5jzvgC1iC fvwqZqSUXKtRzuKTW2jNO7uSu/jv33VPo8NV9+M+9c6wVq1jTT59EBkc5dRyEXhRaCiF 0OiHhtK9wqlh9aR29AE3jCON2IzT5JUC4k/dQbs2f2qnqW3xn9dEHKaqZV41mrQUaYW0 oB3g== 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=70EAjH1mEPJsSZtzQGTYG3z9ROiGq6xc+NqESZ9kKzE=; fh=oLucykxWQyoEvYxBNDtN30XZ3HA8Vjy4Q2Ty4jYWq0k=; b=hoq7EDVvcS9gSAjckyhUaNaC2rLjdTJSP4/K1PVCnlwx/L+wo3KTRFXPUNcI5w68oo DKZrtEwrKqRp+a0+ohjoR3NKjwEDDgLquAifkFnS0Ok+v+5uP4AP/XjCf2Rg2xfI7Is2 NrFrZsyWCeCg6OL9XoYhESTpMwZ9SUbwge1xFs09PJe9b0nZyGpuTUOXTVVc8SsV4RXm a6mbw/ByL5SZMsqnu+h+x03xR97Q8RPcEhWxFCoLP63TfyQBtlKPRdGMI+9McBmbiPhv bIBs4gGf3OTZrQhxDsQEhPdoEerzYoqOwPtCMBeWgNr88q9kUap4JrwYvi8g8L457tX6 PBkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qx9hY8dl; 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-3797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id wg22-20020a05620a569600b0078f11dacf56si5123997qkn.89.2024.04.20.04.07.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 04:07:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3797-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=@linaro.org header.s=google header.b=Qx9hY8dl; 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-3797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3797-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B15561C20B83 for ; Sat, 20 Apr 2024 11:07:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CEC292746A; Sat, 20 Apr 2024 11:07:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Qx9hY8dl" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 79819D51C for ; Sat, 20 Apr 2024 11:07:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713611250; cv=none; b=C6kW1NtAHU/O/FKCfdxgtNzIKHtheNu8NLR2ginAKMrsgIgc80o0LKbJijdigOTotsAlYvbgZNpcTkPyt0yvGeuINSyOyI3ne9BVvyZEGemZvwNVcR7Gk/jyhmbSGNLRJqzImKmd45j61tqdp8oXyFUNW95Imm3M//zyzNv42OI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713611250; c=relaxed/simple; bh=dcW6W541cjLlLnbUpd3lLRGLVMDIgEMRWZZlYdifHNQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mK0Ti+MoB3JR1n4jprLARbPvM7Bme3UFTLv/DcUr5bxdU811hvCQMK+s/vN8thV+4ejQlhAw1hmNlo14ONcLSK1lR+oAALCNwncNR1ol7oIexOaYXPBv7zcHK7pZ5djpiGKFeT4l/HzmQ1ap8uTHqmKUMZPkSVYZM95vD9CUIVA= 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=Qx9hY8dl; arc=none smtp.client-ip=209.85.208.174 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-lj1-f174.google.com with SMTP id 38308e7fff4ca-2dd19c29c41so4634521fa.3 for ; Sat, 20 Apr 2024 04:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713611247; x=1714216047; 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=70EAjH1mEPJsSZtzQGTYG3z9ROiGq6xc+NqESZ9kKzE=; b=Qx9hY8dlToW+VcoJp/6/mek+VrCyhnVm48QqhpNtfFqUUdUEUNbuaflj39knNMAlKx 7ZTsvQ8OL9A8ppP6sI4NoFY1ZTozNUlaoRdDtHjbvqnLwwaxapjHnDHBhPo7W7KxI7+o SPcTIjnI4cNcddiKaUAs3D3aLbRiXuGvGWdwBuQlTcBEhhBsewasPpiCf0fr9336fwAs B2xKPRvI67FAHgtNy/YSgeEA+oz/d5ovMugiLu4LZrbFUzDoZPsVU9MUpdhVeVqknInr 06IUbL0qr/o1NRU9iWx1KC/wnRLSVNcqIyo7ESYMB4GyviVwAMZdienhPkdlsqFQFtE7 sy2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713611247; x=1714216047; 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=70EAjH1mEPJsSZtzQGTYG3z9ROiGq6xc+NqESZ9kKzE=; b=hX6ngTEd3n/97WBa3hHKW3iFx3IYCL1KS0P7rLysqtP3klKkUUNpscToCCx2WV+yLt BLE3SwRwARltq03DqMIdRW1QHmdqY+8R2Ao8vKz607Db7v3yki9fZDDEwMudxyh3eW6U gBUofKRyxvjoVyOOLYPEpvyRIgEGjHI/QToU03cTUvQc2oBmoFb7k6Rk9A8YBrnGtWLo uIy5Dq9pouK77pXCCOmLAoKSIDhpxhl6hBLDIUzgnlV4IprUVhNaeOzHySYjAkGc29i+ VY8tP+slZJwrDfaeNqS13pR8yEudB+cJI1H53+xRv+Yd7Njk4yfW43Rl7atw6f8jonRo nIpw== X-Gm-Message-State: AOJu0YxeyIYRDP9s8lMS7MI9u5UBL/6G3YcESrH2PFVn59I7uUZwwmrB pwCUg6Pbn3ALSwfpIYJAaZZcWrCbXTs3O68REm12pt3cgt6j3WTk0mkseGUwk1YuZa81qbrTkNm /W0J2oA== X-Received: by 2002:a05:651c:622:b0:2d8:5fb1:4b80 with SMTP id k34-20020a05651c062200b002d85fb14b80mr2619187lje.24.1713611246615; Sat, 20 Apr 2024 04:07:26 -0700 (PDT) Received: from [10.236.36.88] ([88.128.88.151]) by smtp.gmail.com with ESMTPSA id bg5-20020a05600c3c8500b00419f419236fsm1433804wmb.41.2024.04.20.04.07.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Apr 2024 04:07:26 -0700 (PDT) Message-ID: <63772c3f-eab7-4be0-8b1c-0cebea361eae@linaro.org> Date: Sat, 20 Apr 2024 13:07:25 +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 v3 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, bartosz.golaszewski@linaro.org, wt@penguintechs.org References: <1713449192-25926-1-git-send-email-quic_zijuhu@quicinc.com> <1713564212-21725-1-git-send-email-quic_zijuhu@quicinc.com> <1713564212-21725-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/BIfXXfC68nMp9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jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <1713564212-21725-3-git-send-email-quic_zijuhu@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 20/04/2024 00:03, 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 BT reset pin is not configured within DT|ACPI for QCA_QCA6390. Please mention if QCA6390 requires reset pin, according to datasheet or some hardware guideline. > > Fixed by sending the VSC to reset controller within qca_serdev_shutdown() > once BT was ever enabled. > > 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 | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index 0934e74112a6..3f5173f1180b 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -2438,13 +2438,12 @@ 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) || > + hci_dev_test_flag(hdev, HCI_SETUP)) > return; I am sorry, but why do we need to perform shutdown procedure now if device is off? I raised questions about this and I still don't understand. Not much got better comparing to previous version. Actually, I have no clue what changed. Where is the changelog? Best regards, Krzysztof