Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2662671pxa; Mon, 17 Aug 2020 15:54:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRcMcJzhqitJTjzfN7Gj4UBj6t/P2nJfkLrERkhei43xVHYyKbW1fxILpSfjX5y1QvXJiO X-Received: by 2002:a05:6402:7d5:: with SMTP id u21mr17966684edy.341.1597704842911; Mon, 17 Aug 2020 15:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597704842; cv=none; d=google.com; s=arc-20160816; b=xwap/TDPg0jMncJhASkc8+1opZ28Zny2y732XNGOIfPve4E9cQ8wBm6Rj6dD4qoALq Sg0sswm5YsM/HUZu3ymWAgcTJrkQRUYPMGqNNBajgac5WpWWhfiNfR9MdoTc4t1AmXnr JWM31eWc7uWu3U0vNBZAyH9YfB1NJO7vwLQQITUO+gQwU/ltHHkbx9xc6zO5cd5ZFRCs ydrmNpzV/XbFkwv9NuUdSVnF0VojAiAynW1rYD3U+bGpu+5Ld/Su9fz1+wT0JEQQ/rGQ Jl/u3HPlV+cMOc+Pm978Ucj5M9EbFyVE6T5ibtun3kCg21UK9SsNgEiY69p8bke+Y/ub Fr4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UbSroZB5e0i3w8Q18g/L8uiYAH9Du1XNQyOIpnxu0LU=; b=FPsTKGef/X6KIZv48qM1uZo0GogbVPjS17xcooDUOzfctQKJRwIsw+E1MEMWojrgYg JPxQafbU2aefaKJwUn5Ls942VhNlDk1rls2W1+Ss6mk+ZIjgl/LJsDpKj1JCC+V6aPwc 6bqguepwCjujh9CJj9rWk3BzLdbN9ndXijLJTN961i0IexDtieEbZB1rqvh/waYUqIOR y+K0KpqpY96uHej/2odB3AaULRtrJpBtl4+r13Uc25YAm7IsEb9DkyD5kZWxFZKZX/PN jkujbjGXhYcZMem1YB5E/2tZ5lLMIGvrW5R6OZ8Cc+/yPWKjnNt+PHiUXCFRMmkf10Rt c67Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YwdszYhJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e5si12157216ejq.390.2020.08.17.15.53.39; Mon, 17 Aug 2020 15:54:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YwdszYhJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732198AbgHQT2Z (ORCPT + 99 others); Mon, 17 Aug 2020 15:28:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:33256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729543AbgHQPcv (ORCPT ); Mon, 17 Aug 2020 11:32:51 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 88733207DA; Mon, 17 Aug 2020 15:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678370; bh=9HeIzrmHQq+22kiEWxMHq/fH8O2AEp9O0/1ippdIg+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YwdszYhJ5MH5KoFQLpCBkmJEWJrkeKSLfZUqu+dEOGS1fcQLL33AnDgEMo5hMzf6e 8Vtni+4L1XepS85cErqNa/Oks0DPFkwxOqJSQg0ris4fswos/vw7YGembCzu+90EMa GqfhwmSVR1/aoSwzjv6PlBFel970En4Q6fKHckLc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Venkata Lakshmi Narayana Gubba , Marcel Holtmann , Sasha Levin Subject: [PATCH 5.8 310/464] Bluetooth: hci_qca: Stop collecting memdump again for command timeout during SSR Date: Mon, 17 Aug 2020 17:14:23 +0200 Message-Id: <20200817143848.645835804@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Venkata Lakshmi Narayana Gubba [ Upstream commit 58789a1990c1a849a461ac912e72a698a771951a ] Setting memdump state to idle prior to setting of callback function pointer for command timeout to NULL,causing the issue.Now moved the initialisation of memdump state to qca_setup(). Fixes: d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory dump during SSR") Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- drivers/bluetooth/hci_qca.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 483766b745178..9150b0c3f302a 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -1676,6 +1676,8 @@ static int qca_setup(struct hci_uart *hu) bt_dev_info(hdev, "setting up %s", qca_is_wcn399x(soc_type) ? "wcn399x" : "ROME/QCA6390"); + qca->memdump_state = QCA_MEMDUMP_IDLE; + retry: ret = qca_power_on(hdev); if (ret) @@ -1825,9 +1827,6 @@ static void qca_power_shutdown(struct hci_uart *hu) qca_flush(hu); spin_unlock_irqrestore(&qca->hci_ibs_lock, flags); - hu->hdev->hw_error = NULL; - hu->hdev->cmd_timeout = NULL; - /* Non-serdev device usually is powered by external power * and don't need additional action in driver for power down */ @@ -1849,6 +1848,9 @@ static int qca_power_off(struct hci_dev *hdev) struct qca_data *qca = hu->priv; enum qca_btsoc_type soc_type = qca_soc_type(hu); + hu->hdev->hw_error = NULL; + hu->hdev->cmd_timeout = NULL; + /* Stop sending shutdown command if soc crashes. */ if (soc_type != QCA_ROME && qca->memdump_state == QCA_MEMDUMP_IDLE) { @@ -1856,7 +1858,6 @@ static int qca_power_off(struct hci_dev *hdev) usleep_range(8000, 10000); } - qca->memdump_state = QCA_MEMDUMP_IDLE; qca_power_shutdown(hu); return 0; } -- 2.25.1