Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp637666lqp; Wed, 22 May 2024 15:19:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXA8NprdCzQ2Yc7V6Nxp0Xu4snNpPHE7rwEBAmwIY6bs5AEgdbLLO6ZN58rBvIk9CVEC69nI38XnTBjix9+IalfURIuWexY2hl9ApZLDA== X-Google-Smtp-Source: AGHT+IEwley2SXX9IFOVMR+/DPW+H28Efpv2JXvmMhOe7GwdgnG+/i0uE3Fsb7zQ99JKt28Pdb6B X-Received: by 2002:a17:903:182:b0:1f2:f382:5017 with SMTP id d9443c01a7336-1f31c9e6f6bmr47903015ad.54.1716416357696; Wed, 22 May 2024 15:19:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716416357; cv=pass; d=google.com; s=arc-20160816; b=hUiJiUIRPjZshWYcvu4Ystx6kXExo31+ivM3YVpEH8tj0lfoS+VfxNi2EnS9V0iCuF OQQSLxQLLd4z5kt7UmrG2JiKnUuAQTWONZknpFXhrh2pTouwDXtLyP05R16Zue/lDX65 8hfuOktkqPuhQxIGVildpNmAA7N7qyXiIRqqMGXMmIN86+uxHi9RhiBTWEpp1NReV3oz Sh2e7rA0ATAx7pa8zzEMeiKLjmEaJ9anQPv+qXHmRfF8smGV892KpmQbfpDpzszCUPY6 FvZ50Aj/da5IKd8xqtqJY+iobgoHXWVGLfZduF/hY6Yls3O+L2iO90wBqy2gF6m5beA/ nHgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=dhrevzC6PfRPXcTVZKdgRT8gCvrtytd4Oo1yvznuYr8=; fh=aSz1LqxJVu2GcHV8GJx0FMXeAnY8EsYNi0led+ctkS8=; b=rwZIwT23BBdPhWiyhUhNJK19F+nbTIzbWco0f2EqzLPxsJoOG+U1xPyZDeVKjhmcZ/ DaF3wxLlTtaOpeo6+x+0ZoqBHqrUb0VOxh1PcPpW3dnjmUCPytNlareuCnxM+yfS5SVH +QlSrAsdzhMTkoQV9buCOdkcEQgvdpf8m1VMymobTCX2GNpN6/mwwuoAnqIDg8OLao2V 618qCP4Xq6PuPfnNPeJ12byRuHojTHnwIciEIVArupIOlYHt8/EK5gXkuAqPFeS45NuE NLRY17ucIUKwoqPsqNzgkhRlYqilMNSf1VP2g58FPAqJ4/xrDxZUJsQkemsc93Xad26F QvbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=vo1S0kIo; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4872-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4872-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f32b156594si14219415ad.178.2024.05.22.15.19.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 15:19:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4872-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=vo1S0kIo; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4872-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4872-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E959B28161B for ; Wed, 22 May 2024 22:19:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D405146016; Wed, 22 May 2024 22:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vo1S0kIo" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 0092842078 for ; Wed, 22 May 2024 22:19:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716416349; cv=none; b=Ukj4MfqGKG5Bo5nOIEnsP6e7F8fL6IrrofNKaq2HiHaue2TIVy19+i4EbUTrWrkYPpXWDxZfD/5X2OimMayvGTxms9S5Uvuw4OnxNWV9e5qNRa2HVQrI6xqXqHb8FOLMJnjEJHHOVqZwleHqQQDeBBXxIOxc4Ub4xV2+jtFSM40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716416349; c=relaxed/simple; bh=swwro8lOZgvb3QDkxq4qjw5SkDE6YkcxR3UDNunhgjU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=msdj30tGe4ShPifo9zUk16j3ym5Lkbnjh/iSmhq8rfVAZdCSC2/1WOfWox66EponvTUTxCMGz2rr0l/gUSm8PGAOD6Q5zkr454jwQkb+RNrdwxyM5BiDtf971IPPXCd3xq8KK/o7iSxLaDTB/HKbRwYcVXQ8XlYeA0SAP/i7aS8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=vo1S0kIo; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5724736770cso1984a12.1 for ; Wed, 22 May 2024 15:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1716416346; x=1717021146; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dhrevzC6PfRPXcTVZKdgRT8gCvrtytd4Oo1yvznuYr8=; b=vo1S0kIocnO+7JNu2yVpq6kFxVrRiUgn60vLk4EGZ7KsoUK7deRm7/CovIesjdW7Ig LjIxAotbJmbn0rbsJgF5cTBJekhsl2CMkXFGa2iTW/RTqlb6UEcW6eJ55ITAADKNcNzq c1T4Nvp65Po7+ddgPNbZARXgxT1Bm76xPKBSnusfhwz6ajMpw9zt8sBm6IWdkxILjvyu D3RBYgWDvMft7QQh8JZf7o9o2LP2xrlClLKpHMjKbbwONyvqtVVkdUeCL4cT9IUfrGVd gLMAeXMbcsNMWyn+B/gp2sbLwMnz2Gz5v+rbh62ubpxbo65BSSrhUwfXW291QQSfiadr OJZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716416346; x=1717021146; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dhrevzC6PfRPXcTVZKdgRT8gCvrtytd4Oo1yvznuYr8=; b=FL9VfMbD7wtC73Viuy2Lj9MzSpOGiEi/c5yRUVRv0JE1dwvcQMD9AxB0Q7SiWp2H+x IkU6Bh61CYRTZuz9fhVCKygSUUqBE0HDwCEFMbcXTTZia4FUHMcoq3V5+b9eorKxO6eV W5ozE5U5MrRiBJNp8sXTdmJaheL050IJ/+wzf4HsKXFRLg3IEC6VAw0SRidRUKurktfp 7Reoy/jMGo1q8MuPyPqzastKxDkwByHAKFk+yitsPpqiEJKPz1W5tSvxZvsMXd6Amfn7 clZsPIQapoi9qoqEStOYrvBIRuiHWW9iNCJHVt46Zx/41JStSViHtkXqbRHbpZ81rBrn TvbQ== X-Forwarded-Encrypted: i=1; AJvYcCUk3LZnIxBT5ivKRzBaDhrym41pn6id3o7wdzyKpmh1CSa9kIGn1tYkbt72bppFbP///Rdx3bs6C5UEjVUuqtud+xPe0neId9eiFuFcD9be X-Gm-Message-State: AOJu0Yzo8HLX/xwaBqJTk6Z1XcO1kmmchA9+B3qZ0A5aRmrYEIKk/M0C VESM0muM5MIzyeD3htFkTcI+KTll8Y5ld7PJ8NLvu8TtRPJwVZ/mizDoO2IDKHYje8WBlJEea/+ aMGS/u6zuGWn/ZKwwRKWp70OeHKlZZG28WMoN X-Received: by 2002:a05:6402:3551:b0:572:e6fb:ab07 with SMTP id 4fb4d7f45d1cf-57845a7c1b2mr12747a12.7.1716416346140; Wed, 22 May 2024 15:19:06 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240517170246.1.Ia769fe5fbeaa6aca2edfb01b82eb7df0c6955459@changeid> In-Reply-To: <20240517170246.1.Ia769fe5fbeaa6aca2edfb01b82eb7df0c6955459@changeid> From: Guenter Roeck Date: Wed, 22 May 2024 15:18:52 -0700 Message-ID: Subject: Re: [PATCH] Bluetooth: qca: If memdump doesn't work, re-enable IBS To: Douglas Anderson Cc: Marcel Holtmann , Luiz Augusto von Dentz , Stephen Boyd , Guenter Roeck , Johan Hovold , Bartosz Golaszewski , Sai Teja Aluvala , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 17, 2024 at 5:03=E2=80=AFPM Douglas Anderson wrote: > > On systems in the field, we are seeing this sometimes in the kernel logs: > Bluetooth: qca_controller_memdump() hci0: hci_devcd_init Return:-95 > > This means that _something_ decided that it wanted to get a memdump > but then hci_devcd_init() returned -EOPNOTSUPP (AKA -95). > > The cleanup code in qca_controller_memdump() when we get back an error > from hci_devcd_init() undoes most things but forgets to clear > QCA_IBS_DISABLED. One side effect of this is that, during the next > suspend, qca_suspend() will always get a timeout. > > Let's fix it so that we clear the bit. > > Fixes: 06d3fdfcdf5c ("Bluetooth: hci_qca: Add qcom devcoredump support") > Signed-off-by: Douglas Anderson Reviewed-by: Guenter Roeck > --- > I'm nowhere near an expert on this code so please give extra eyes on > this patch. I also have no idea how to reproduce the problem nor even > how to trigger a memdump to test it. I'd love any advice that folks > could give. ;-) > > drivers/bluetooth/hci_qca.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index 0c9c9ee56592..1ef12f5a115d 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -1090,6 +1090,7 @@ static void qca_controller_memdump(struct work_stru= ct *work) > qca->memdump_state =3D QCA_MEMDUMP_COLLEC= TED; > cancel_delayed_work(&qca->ctrl_memdump_ti= meout); > clear_bit(QCA_MEMDUMP_COLLECTION, &qca->f= lags); > + clear_bit(QCA_IBS_DISABLED, &qca->flags); > mutex_unlock(&qca->hci_memdump_lock); > return; > } > -- > 2.45.0.rc1.225.g2a3ae87e7f-goog >