Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp183719lqd; Tue, 23 Apr 2024 21:07:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZOpdAOhqi+Cvc98fpsdnmI6ukUcZj9DE98BQN34tRTg111wQMOFYdO3zGQRE8bz3r3h4bhpHWEYSo+KtGDcqAqmE5KIk9pgRvXw2e7Q== X-Google-Smtp-Source: AGHT+IHGP+KFa+B0jnGE+aMHwCjDbV1unRw0g9/Dqn9ZBUasF3pjkokaZMF3xJpy/9TrSLuxNZ+c X-Received: by 2002:a05:620a:2487:b0:78d:5d7c:9896 with SMTP id i7-20020a05620a248700b0078d5d7c9896mr8050626qkn.36.1713931653758; Tue, 23 Apr 2024 21:07:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713931653; cv=pass; d=google.com; s=arc-20160816; b=A+sFOssn9ahX9apogeQzOvvezMqvY8D+0SJwfdyFUkjUhq1x01hCl0rBR/5Hv2zmBW YQVs3eBnF2iN0rZYty0tbPOJuXtj8TnyR/aH7lt0tqIKiEA94rz4DHwSLFKFf2gEYjIU JhoRDnPAxKaw+j9usqMhPoRzVahZnlLGCOLRg4rAMv4zf6q/BgeaMoHE97SpnWFuwKSS Hv4nm7Tf41MXD3pYA8wdkjQCN6bpYR/z9kDciUWLzE8I9LtH/n8F85E+x94bjDYVmH3P Wxi8SZp5e/LFA75v0oWqSuJHBuM/46GDRHwX3EiE5Y9YhDAMw/KYlPZ22BLZmn+k3wmq /GvQ== 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:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=qtmBEq8KlrPnZUrc9wyQPtPGNGRjXzpVIpe3uN+cYwg=; fh=fvv4QZiTrt8I7HpXd0RNQef2O3Fdp8pqQ+JSz3DzicM=; b=gB8Wst1M+u0BcdKB/YrBTkxbmY+CPYFFGoW5rr+a6u3aryfy8SpeaipQbCVxLYEA2f vBgYjyKTLxPVxAleXq4MGczyr4jmlURRs+p6p8KJocelOKN2C70bpNqmQA4fswfYIWj/ 0G5E/mEaIS+b0wZCQKmxU6l6M8R++2OQGdmuiUyXr5ImGMMwOeDLwrfTwo/b0wG1MH8B 05FGViz+n+BKmAblzLhVNfixnvmsdQNz8de+ynXcOIvYgLXHVyPdqANBsjL+bqaZFR4/ esIn6PMUpxEHJNnbAe+oEOsc0pNGLXkSaHYGyvZ+mBVeJFhIs+ur5Cse2V5GPaFWBSi6 xQcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jNztoEaR; 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-3924-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3924-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 z14-20020a05620a08ce00b0078ef1372006si14034164qkz.288.2024.04.23.21.07.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 21:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3924-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=jNztoEaR; 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-3924-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3924-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 687F61C20F34 for ; Wed, 24 Apr 2024 04:07:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DA98144D0F; Wed, 24 Apr 2024 04:06:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jNztoEaR" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 D0C73143C60 for ; Wed, 24 Apr 2024 04:06:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713931590; cv=none; b=rWue7T7dKrpKO/eT1sEcIoycj+A89uqDJIfgqltTXprhqtJGZLQHcIyFluPM4HlL8MX9Xa9NFumsY02BXBlHIlqd2lV2zC5JWTdLt5Vu4MiiktED9pTMOjQUtWxoPtoqYIqcj64tMVLaPzr+waPz2wZMDrsDOcRKX//7uHHbMAQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713931590; c=relaxed/simple; bh=PuPXjwkBwAE+05mxqeu9X2cnKyYSIQjvqU8GspVwiCw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tGOTSy90Xdp0C9xxH60z374delywxsMgs6c5xhy77pmLOSD+y+Lv/5xoZEgVy5+2vTCP+tlDsPfUszXR2I4YUbxK4fU3FhY8Kdzxnwoiyo604OXtqHkL+eP1q8ht/ODFXmVUQiNHr+5SDBpGpsBOOl1yWTK94ydfBHwDxBzsDAU= 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=jNztoEaR; arc=none smtp.client-ip=209.85.218.53 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-ej1-f53.google.com with SMTP id a640c23a62f3a-a55911bff66so538634166b.0 for ; Tue, 23 Apr 2024 21:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713931587; x=1714536387; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=qtmBEq8KlrPnZUrc9wyQPtPGNGRjXzpVIpe3uN+cYwg=; b=jNztoEaR1GFMqCyhd4G7SLOHqeHHqvxgVvTQXW43B4Lwv1LHz1Xcz2C827ZgowYfIk F+Ziqizf1mAil4PGyGnhJ2Tu/KzvNDyooMbEGf3vOzL31x2+iQiYVhz8UovHr53dsX7e TWA7K8lD4p82U+X7ixJKLSWWxVcRnFVuJUbe24yBsGhs+xXAnIcIWMTfQb9u24edrY4w wWXjXYnapfLsyfpj7b2odpFk/bIy+Jb5SlH8EVGwNWNX8mGvTVrkH2gcFhjILwTkX6xQ v5aNJ2TvlBqAcZnpyvr3JDAtySDx/MI/0USm6VwtlrL7ifnt2sYl2DY4bInQXA+fgk41 PBZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713931587; x=1714536387; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from: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=qtmBEq8KlrPnZUrc9wyQPtPGNGRjXzpVIpe3uN+cYwg=; b=cEaf9KsjVTRITKcpbwwKQKW6M0ljM/GP7gjM95AmtzoQNtxcSUW6x3OXcD4KeT41zl L1ys5c4c0Kj0pWdQsRxUZ8nLVeteu6uKNwjt7j6GjNONTLEeaqS/hCzOsIQP8Hsm9pYw X9DqZjW9otPrhWwnaXrdth6vi0mRxLZGSK0xSOEq5/9mhw2XJLdw4qDwc0OC2U6OO8mv gxmPLOOl4q7GCs6bIxfhG/jWrq7dkdndY3rD/5vB2yh0Z5OB5QLuiFcEL/mM92krRmmA TzbyOCo+VXaiQyrsyOBPom7snYt+iSjGf8zevVhbc/sGp/xVTedmIxBWtg2M9WC7lN+8 AuIQ== X-Gm-Message-State: AOJu0YylyaIhEZr5NFLA2xt9FmCWwtSseFSxOM7k3AtLk0PEqUXWI9u4 7isBd/dJb1gusUpyPzHWssT+UByX+J0OhaQGsfoj54qzr7whni/CbiXsDDuoH0A= X-Received: by 2002:a17:906:34cd:b0:a52:5b71:d91f with SMTP id h13-20020a17090634cd00b00a525b71d91fmr677367ejb.19.1713931587284; Tue, 23 Apr 2024 21:06:27 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id o20-20020a1709064f9400b00a51e9b299b9sm7751153eju.55.2024.04.23.21.06.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Apr 2024 21:06:26 -0700 (PDT) Message-ID: <349b27a5-d2d3-46f1-b002-44f81e0cedef@linaro.org> Date: Wed, 24 Apr 2024 06:06: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 v6 1/2] Bluetooth: qca: Fix BT enable failure for QCA6390 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, regressions@lists.linux.dev, kernel@quicinc.com References: <1713919602-5812-1-git-send-email-quic_zijuhu@quicinc.com> <1713919602-5812-2-git-send-email-quic_zijuhu@quicinc.com> From: Krzysztof Kozlowski Content-Language: en-US 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 TNeBxJu5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4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <1713919602-5812-2-git-send-email-quic_zijuhu@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 24/04/2024 02:46, Zijun Hu wrote: > Commit 56d074d26c58 ("Bluetooth: hci_qca: don't use IS_ERR_OR_NULL() > with gpiod_get_optional()") will cause below serious regression issue: > > BT can't be enabled any more after below steps: > cold boot -> enable BT -> disable BT -> BT enable failure > if property enable-gpios is not configured within DT|ACPI for QCA6390. > > The commit wrongly changes flag @power_ctrl_enabled set logic for this > case as shown by its below code applet and causes this serious issue. > qcadev->bt_en = devm_gpiod_get_optional(&serdev->dev, "enable", > GPIOD_OUT_LOW); > - if (IS_ERR_OR_NULL(qcadev->bt_en)) { > + if (IS_ERR(qcadev->bt_en)) { > dev_warn(&serdev->dev, "failed to acquire enable gpio\n"); > power_ctrl_enabled = false; > } > > Fixed by reverting the mentioned commit for QCA6390. > > Fixes: 56d074d26c58 ("Bluetooth: hci_qca: don't use IS_ERR_OR_NULL() with gpiod_get_optional()") > Reported-by: Wren Turkal > Link: https://bugzilla.kernel.org/show_bug.cgi?id=218726 > Link: https://lore.kernel.org/linux-bluetooth/ea20bb9b-6b60-47fc-ae42-5eed918ad7b4@quicinc.com/T/#m73d6a71d2f454bb03588c66f3ef7912274d37c6f > Signed-off-by: Zijun Hu > Tested-by: Wren Turkal No, Bartosz' patch should go. Best regards, Krzysztof