Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp183130lqh; Thu, 30 May 2024 19:40:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV31w2GfRoi5EPH4mVM0Z0t2xeLz0bQCTKbtiwYiljfrvwyViXxiszhzu/z/Ry1buBLj8GnfA/VQ9nysP1Y5HTp+53bB9hQEPlauLHIAA== X-Google-Smtp-Source: AGHT+IHphg2v+v5YXswwjF/I69eJtTgkCRzI1gZxuPQPBGVyYHbS7uPJJXvY/yWgOl0tDCoarIIg X-Received: by 2002:a05:620a:8d7:b0:794:ee73:74b0 with SMTP id af79cd13be357-794f5ebf450mr46248685a.53.1717123221708; Thu, 30 May 2024 19:40:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717123221; cv=pass; d=google.com; s=arc-20160816; b=gv/c4rOrEQgHB2t/ug/0FXXyZvpK24MTmPyVsG+fNKxwPW+vqiwEAEtuVTx5A4Nb2H /h6iOoZvCBuG7Y0JlckK8sUBhbclf2cEYg6RA34Cm5CXr4cYhv4UhQnilP1pNowMqwMH /aJUsC18Oc+bxT5xPkpht71BzMFTYLSAT/iGgnLDcRNMLCD2wbqZpHE4AoWiRwNe95S2 OglkqpPDwhuIyciDKwaSEd/jrTy5bEuzUJsuUe2PQJ0lwB/KGr3EApQZ6CcUbeP4P1pd r6UFFVRjqGB9ONYqFeBruA/j2crtEwjdjKQn3y3w6MGj6VvJP+2xuIM8vRHA/wLnC4rd loHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=WIJ3LBCrK0EpHcJ4m1/nQVmXfst4QqoPOaaoka2iaRw=; fh=GvdSpWOTOOEO++mEtOt0MOXW4RZebXmBponUWoai99Q=; b=XswYFp4vT5LxWZp5EnGVYWXcWptJfyK+0v6w/O9HdJgr06ESaIsWM8Mn/EJbGhakzk hubBGd+ooB/1+/ZhSwhJAItVhX5h5MXKD12pEOvvQG8lMRk8z+bNvQZZ2NfYrKwHWYNb YewdicJyltClt93PogNYpliXSbGnr0GakM/ZzWHu3+ytRFF0EQHBenXv263By9ddpwJK so1n1j7CQhy2h0z5Z2CRQqLzQUvs/FOMtv6r9zOt25WwC8NhSaktHle1vW5Pbaj1ufYa QETHCefYpnK0CirfmIA21QHNBBb1Z8bk2SUmW2s1CaZWKiCGPILJcdh59OyrlEWqiBTW S+jw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cAayvBnL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8333-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f31828casi97053385a.444.2024.05.30.19.40.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 19:40:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8333-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cAayvBnL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-8333-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6ED3B1C221A2 for ; Fri, 31 May 2024 02:40:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CFF6377F1B; Fri, 31 May 2024 02:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="cAayvBnL" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD89E1F16B for ; Fri, 31 May 2024 02:40:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717123218; cv=none; b=Yo8OBvgIAa2mFZ0r9u4v1WmnYMqZX7kZSJNNpETC+9rDS3HOg8eBTBPoFBitzCYGvmMCaTaTHmETbvYrpGVr7ZBlIcOZNyUfEPZcrPHMo2tTeHRFdnCqxhXmxlOeXLFNdDn5mHfguOWyBAchtNFaw6WCfKMiqvztnxbfOtQGcdE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717123218; c=relaxed/simple; bh=HZimZAbkrDokM+Mqvu3mXxi/NL3/poa8bXrHQCV4x+s=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=mtS1vL3GMTR3oiTZLwY4lBn91LiQfwIFkOwTLpLoyI0hR1EN4g5XeZm6iF7ZdCSx4Ar+lJO1iQmGVvTUhdJG9h06YBHNC0AitBXemWRjx/a5xM6y2T58ZsvYp1ruwmvzPmV/MM+lSy+pWW/UTNo47D0QmW3haSjU3WUPBorETj8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=cAayvBnL; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44V1m07a003487; Fri, 31 May 2024 02:40:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=WIJ3LBCrK0EpHcJ4m1/nQV mXfst4QqoPOaaoka2iaRw=; b=cAayvBnLrqk5rnfM+XXAj2wgIm+N8OmGsyK6EI iP7zmEccBED1kgWUKz5p00+ogHnuHEAfNggVaNP/Wnmq+gVQnoq8v9/b8dDdcJXV kshYYKFk9FGYzrmTkSaw549Hvh2P6WD6500VNzJffwo4UqxVAy+jwPrVGK7vUyb/ eW/C0zM6sg2jJ6Yev6lxjqOSnUxmXeQ3rsjsXUZdJ5R23jTGyF0zyRqRWI8b44aF ckNXkaqdc1L3TesRpBEsMfmDzXqlD0Hh7SXrLXaWsGGV9FWf4SRGxBq8Um3AudtY S5GDg/aOckJqEiBRpUwsvypY/Us/kRGitnzCh1AB+eOdLlCw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yesw5hmj6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 May 2024 02:40:12 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44V2eBeP019630 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 31 May 2024 02:40:11 GMT Received: from bqiang-SFF.qca.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Thu, 30 May 2024 19:40:10 -0700 From: Baochen Qiang To: CC: , Subject: [PATCH] wifi: ath12k: fix ACPI warning when resume Date: Fri, 31 May 2024 10:40:00 +0800 Message-ID: <20240531024000.9291-1-quic_bqiang@quicinc.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: XlvVy4vUr7IVBBvdQlKV3N0gkxPjJkEy X-Proofpoint-GUID: XlvVy4vUr7IVBBvdQlKV3N0gkxPjJkEy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-30_21,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 impostorscore=0 bulkscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 spamscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2405310019 Currently ACPI notification handler is installed when driver loads and only gets removed when driver unloads. During resume after firmware is reloaded, ath12k tries to install it by default. Since it is installed already, ACPI subsystem rejects it and returns an error: [ 83.094206] ath12k_pci 0000:03:00.0: failed to install DSM notify callback: 7 Fix it by removing that handler when going to suspend. This also avoid any possible ACPI call to firmware before firmware is reloaded/reinitialized. Note ab->acpi also needs to be cleared in ath12k_acpi_stop() such that we are in a clean state when ACPI structures are reinitialized in ath12k_acpi_start(). Tested-on: WCN7850 HW2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: 576771c9fa21 ("wifi: ath12k: ACPI TAS support") Signed-off-by: Baochen Qiang --- drivers/net/wireless/ath/ath12k/acpi.c | 2 ++ drivers/net/wireless/ath/ath12k/core.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/acpi.c b/drivers/net/wireless/ath/ath12k/acpi.c index 443ba12e01f3..0555d35aab47 100644 --- a/drivers/net/wireless/ath/ath12k/acpi.c +++ b/drivers/net/wireless/ath/ath12k/acpi.c @@ -391,4 +391,6 @@ void ath12k_acpi_stop(struct ath12k_base *ab) acpi_remove_notify_handler(ACPI_HANDLE(ab->dev), ACPI_DEVICE_NOTIFY, ath12k_acpi_dsm_notify); + + memset(&ab->acpi, 0, sizeof(ab->acpi)); } diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index e7f628e935e4..92f442f8e03a 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -83,6 +83,8 @@ int ath12k_core_suspend_late(struct ath12k_base *ab) if (!ab->hw_params->supports_suspend) return -EOPNOTSUPP; + ath12k_acpi_stop(ab); + ath12k_hif_irq_disable(ab); ath12k_hif_ce_irq_disable(ab); base-commit: 6e7a5c6d5e38b93f9cc3289d66a597b9a4ca0403 -- 2.25.1