Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2171607lqt; Mon, 22 Apr 2024 03:45:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVT5r1F/h6ZCo0O8DkGfcKFBC/3IIlMgOOxZfFYFv1YTQaG2IkbWi1hNlC+AQ1xQT/aDFoM3ujGa17vh32JMSJc/uh1MpkKpJM4BI9wMA== X-Google-Smtp-Source: AGHT+IE6IOTg854uAob8PlDWaK0rfyOWeAyWbf5xjIcQxMJy2xWVH6WDr1gG7Hmh7AWPbYCvpXWR X-Received: by 2002:ac8:7f14:0:b0:437:b9fb:dcff with SMTP id f20-20020ac87f14000000b00437b9fbdcffmr11959092qtk.7.1713782744504; Mon, 22 Apr 2024 03:45:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713782744; cv=pass; d=google.com; s=arc-20160816; b=ZWsMg+D3tROXDyo8A6kJw2w9B6h8te3uqj3m3Da9SnlnowRm3fcroKvILt4y+OVtCy wT8XLEpUE3TrOgL9FF4y1F5j47u3p2eV6Lsgd2aA41qmdfS4EotbPOv+2+DmX//6TWy6 U1aUD3/B7TMTgqqKfBBP08M8c/qwEanrVqq6vj4iFojPSfepq4YTRwf50ZNzIxEtXEeP +NomctYrqVEj00FXdFlev6g45t6yAUiRzmRXAnb3uIJvopXnmQJ0fnnqEcbrCCgGH277 E/Y9AbY+IRVpJ/XmwjHdAwLquanSz8kYMV58OpuQqzN4P5NUBPaMC8iije2C18Gy2W8K 0wFg== 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=w94qF8cC6iTKYV8wt+9+7HGOk6wH/vdndzcUg06Y5Ms=; fh=6A/wkaJcT/eQrRG3g3deSMeC8JlhUBDtruZ0QsjmJ48=; b=tcDlYluUIY+aK9l/+Q4OaVdrVT4uDY0g/KC1MBWecD4lGFlmvZDfuuAFZfXvRbRR9Q fejb7FWVGZcQTgL6HG+ragEcAq7541zm7xCy/H+rZnb5EnAdPCB1BHVuAaGBIdLFmI4E LtGX2IdBNcUQI616C8HtZRB3fu4jR4UtkC0JVvLyKw3bpFgqKWlh5s3D/Hc1EigoBUC2 /uoZ2loWbFWnUfudvMFp4EV61qzRhGA9PG96ZpXGyZdSLRH2hitcaGsBTx1ZseQvfsnr /pJ3YYkC/XjhJ4VqNzL+3KbIe6tT5WRkPkAODqFsDtgz0g/XQWAfSOzrs5MQrF4fximy MUrw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@penguintechs.org header.s=google header.b=CHC7KK2B; arc=pass (i=1 spf=pass spfdomain=penguintechs.org dkim=pass dkdomain=penguintechs.org); spf=pass (google.com: domain of linux-bluetooth+bounces-3851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3851-linux.lists.archive=gmail.com@vger.kernel.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 et21-20020a05622a4b1500b004370dc3ed83si9326006qtb.581.2024.04.22.03.45.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:45:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3851-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=@penguintechs.org header.s=google header.b=CHC7KK2B; arc=pass (i=1 spf=pass spfdomain=penguintechs.org dkim=pass dkdomain=penguintechs.org); spf=pass (google.com: domain of linux-bluetooth+bounces-3851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3851-linux.lists.archive=gmail.com@vger.kernel.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 307581C208A0 for ; Mon, 22 Apr 2024 10:45:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 890331465AB; Mon, 22 Apr 2024 10:42:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=penguintechs.org header.i=@penguintechs.org header.b="CHC7KK2B" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (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 56B911465A6 for ; Mon, 22 Apr 2024 10:42:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713782550; cv=none; b=tPPhNf6njkIXauMafiXt8JQG2Ky+PxikAbfjyOW+NBaEL1hb7riuyEmXvOWRZ8HSNgxnWhFuTELM8Aw3JBJKO8XI5ag+QgRAIVDriYNDfH2eckf7geLW/QMYWSIVRueEIIh8lh7HA5N4sh2ZDl7ck/CThg04Xsc+Lrg8P3SL6eg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713782550; c=relaxed/simple; bh=pPv0F9B7dGBas8/9IU9XWvrJKMjRjapiCH6m5RmERd0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TNypcQKyvk/Iw7xYtuXY7O3ZNk6bn5ja3S2iXxvfcPC7q7V/10Y5v+tTs18lt/VNOU2gyH8Bwfq6+2qkxPa255bMFu0EpPnoUaZ2BKhZBFbpkk+L3svhozpEzYcpiDOOlwWQN/MNBNODZ5goVaGdLFd1RK18dOnr5h8m+nUd0qA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=penguintechs.org; spf=pass smtp.mailfrom=penguintechs.org; dkim=pass (1024-bit key) header.d=penguintechs.org header.i=@penguintechs.org header.b=CHC7KK2B; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=penguintechs.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=penguintechs.org Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1e5715a9ebdso34030465ad.2 for ; Mon, 22 Apr 2024 03:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=penguintechs.org; s=google; t=1713782548; x=1714387348; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=w94qF8cC6iTKYV8wt+9+7HGOk6wH/vdndzcUg06Y5Ms=; b=CHC7KK2BfGJM5o3u2dw23N+YsvQkWU/uKBEeWQ+Ea6Klezl//85qP+w5tfr7PUQo4W yh7EdblKry9pVZyvC00G9SeBtjVm8VKW0KGVTcZ+2vmLNsiaWCXFr3XKQyLAHMD/Nqn9 U/nlmhqw1FI4NjMh0f5DO6au0iD13cwSnd4E0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713782548; x=1714387348; h=content-transfer-encoding:in-reply-to: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=w94qF8cC6iTKYV8wt+9+7HGOk6wH/vdndzcUg06Y5Ms=; b=aaDZrFbqXI7v9MB66YULKcmPPytT928aE9Q29Y3zUtkzHhCGqnmHie0EUOrcGS/iyI IppxvjiqcFarPycrJft/sVtBhto1vJVH6ad6MPHTWawTfRS0Y2lafWlk+FFBNpibX781 dulRoRRWMV/0fLEUaB6IFLvfls5RkjdRynUjam6i6nLZes/BfOULiBg+lqEVY3AQ5fqu Js25ccy+28pSp4dELpdek3O03bljB024z6F5MbNZBf776ELdr+xPX5mwz9UQ2OeksHC7 5vqMXPcJQzy6AwsucZyQ8tYXPtql8BfULQDnE8rBqpFIOFk8A85luS1EKxo/OneuMubb PvrQ== X-Forwarded-Encrypted: i=1; AJvYcCVJiWkhRqhzxYi04chhiEyftVosPB2V01k4IMTtyxoDmC1hbMxAcxqojTLbIRB6GbrQkRZ89gZx9xfTdx0BlIOD4OCMCCG4Xxez2FGo7o9A X-Gm-Message-State: AOJu0YxYU+TqCDRcxkq5NUadcquQ6OJTi8meksyUkDrZI2t4DTK++5B0 aA+zVAx00c6ZppAUWb+Iv93B1jmL3gb9nzFsDxpbgx9rN38WPSq7yiq/BsTI8w== X-Received: by 2002:a17:902:daca:b0:1e2:7d3b:353c with SMTP id q10-20020a170902daca00b001e27d3b353cmr10797104plx.18.1713782548372; Mon, 22 Apr 2024 03:42:28 -0700 (PDT) Received: from ?IPV6:2601:646:8700:dd30:5f3e:5ba7:e0ea:9a08? ([2601:646:8700:dd30:5f3e:5ba7:e0ea:9a08]) by smtp.gmail.com with ESMTPSA id kh3-20020a170903064300b001e48565b40csm7826758plb.210.2024.04.22.03.42.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Apr 2024 03:42:27 -0700 (PDT) Message-ID: <5da9ecae-35c7-4968-9f16-3f10e04c2b1a@penguintechs.org> Date: Mon, 22 Apr 2024 03:42:26 -0700 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 v4 0/2] Fix two regression issues for QCA controllers To: Bartosz Golaszewski Cc: quic_zijuhu , Krzysztof Kozlowski , luiz.dentz@gmail.com, luiz.von.dentz@intel.com, marcel@holtmann.org, linux-bluetooth@vger.kernel.org, regressions@lists.linux.dev References: <1713564212-21725-1-git-send-email-quic_zijuhu@quicinc.com> <1713650800-29741-1-git-send-email-quic_zijuhu@quicinc.com> <369512e2-f091-4370-bce5-9ac32178dc4d@penguintechs.org> Content-Language: en-US From: Wren Turkal In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/22/24 1:51 AM, Bartosz Golaszewski wrote: > On Mon, 22 Apr 2024 at 07:21, Wren Turkal wrote: >> >> As the user who originally reported thes issue, I can confirm this. I >> was introduced to this regression because I use Fedora Rawhide on my >> laptop, which builds and pushes kernels based on mainline very regularly. >> > > I don't doubt my patch could have caused a regression. > >> Here is my description of the regression: After the reverted change, the >> BT hardware in my laptop (qca6390) will only work after a cold boot when >> the hardware has only be enabled once by the driver. Once the hardware >> is enabled, the process of disabling/re-enabling fails. Also, the >> hardware cannot be enabled after a warm boot of the laptop. >> >> Among other things, this makes logging into KDE Plasma break my >> bluetooth mouse. The cause of this breakage appears to be that Plasma >> disables/re-enables bluetooth hardware upon login. >> >> GNOME operates slightly less badly in that bluetooth stays enabled. >> However, if I manually disable the bluetooth via the ui or by restarting >> the bluetooth service with systemctl, the mouse fails in the same way as >> happens with Plasma. >> >> Once the bluetooth has failed, the only way to fix is a cold boot and >> only enable the hardware once. I cannot remove the modules (btqca, >> hci_uart, and bluetooth) and re-modprobe them to fix it. I can't restart >> the bluetooth service. I can't do both of those things. I haven't found >> any way to re-enable the hardware beyond cold boot with bluetooth >> service enabled. >> >> If I disable the bluetooth service and cold boot the laptop, there also >> appears to be some kind of race condition as not enabling bluetooth >> service very soon after loading the hci_uart and btqca modules during >> boot puts the system in a state where I can never enable bluetooth. I do >> not know what causes this specifically, but my theory is that not >> starting the bluetooth service immediately puts the driver in a similar >> state as when the service is started immediately. Maybe some kind of >> lazy initialization that is forced to happen more quickly when the >> bluetooth service is enabled? >> >> Any way, this reversion by itself (which I manually did after a >> discussion with Zijun before getting his test patches applying to my >> kernel for test). However, this reversion did not get the hardware >> working after a warm boot. >> > > This all sounds plausible. However just reverting this patch is a > waste of time as checking IS_ERR_OR_NULL() on the return value of > gpiod_get_optional() and continuing on error is wrong as I explained > several times under Ziju's emails already. I provided a suggestion: > bail out on error returned from gpiod_get_optional() even if the > driver could technically continue in some cases. I don't want to have > to argue this anymore. I'm not trying to argue. I am trying to find a path forward as a concerned user. I am also trying to figure out if there is any way I can help resolve this. I am not a kernel developer, but I would really like to contribute in some way, if possible. > > Bart -- You're more amazing than you think!