Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2114919rdb; Tue, 20 Feb 2024 18:47:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXTiAC8rFFe0/biJ2NZksrI3hLWrBegfO8b+HwoHWWYZzTy5CZq5E/i5nzzFeBtM73NEamlZKTAqLsuF9Wrt8MNRNh+57TG4RGamcPBbg== X-Google-Smtp-Source: AGHT+IE0bz0kRcrzwQiiRfks+kQX/mcRGlJNNwYGBfJ/g9EKs2UfQm2V0EIAHUCF5L5AKXLQqKNu X-Received: by 2002:a05:6a21:3a47:b0:19e:4f38:d8b8 with SMTP id zu7-20020a056a213a4700b0019e4f38d8b8mr19903803pzb.49.1708483675521; Tue, 20 Feb 2024 18:47:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708483675; cv=pass; d=google.com; s=arc-20160816; b=YoSXp2vQEgv9zo1ldwvkOQwrhuCxMEfPm0HIfy9LTDVVOhy2R9fi0RwZwfGgsUj3yy q8lc6e5HUlC5U614bB4Jyh7Z0j9yKH5MEnLyUdcVDlhZTCTBQmJxEPhmRZ9GXX1bc16+ A5qsB4XSLu8PLQZOBhc9/DqVR4SKqhnxj2kN6MlaEc4/v8fSZlsn+FjHVs9l7hPs8rO4 dKN50iZzW56O+eH2LoflZr/bvF9PGPZZHfrvl9PW6WNeIC504aRdWMNuLdjbOf64CoDq ruYG2oL6zHdUEwHmfJmlULVn6xZVbZCAQObOaZx3FwUdoQt3gO/0OS2ODiXmUgyM81kR mXzA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hS43JUPpBFkWaxKWv0yuFZnWSyCbqQIwNbs8b1w7h4s=; fh=j480mrNlK527R2LSjAa5EczedEomDzgwrIPbXwRGWTc=; b=DDf1lIcg/PyF/Sp+5IYAWFSur25YX85MEAf53hRc/VlL+wXByteaY7CyMoUyHp4scD sSQkcRoLWDVkBC6/oBSjDIHPPg+rY/6DOd63qddGJg4MdOQaE59tzSjsatpOgSJVLis1 tMO2mg3TYwKI24nZ8MhA4lSF8QEG3tnoGzjz+ohe/lHOgO+iRdRerpLj1caO7uPf/g7P GHJ4du1c4Lp6yH3Y2ZyMIRCEKdBo9KKeox7t2BnMMoKF2ZaTPcmVn0VRIkj6pK58O3Ul Q/0XtCrhjlrd1PXevdXGWx7RO+Y2jPrUI66Z/bB6dMSWEWo47hfGmZVFIkOSsmi2p+JF Rp3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jfeB4qQL; 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-3827-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h6-20020a17090aa88600b002964afac9dbsi600830pjq.2.2024.02.20.18.47.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 18:47:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3827-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jfeB4qQL; 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-3827-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3827-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3C0F3285B98 for ; Wed, 21 Feb 2024 02:47:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3224C2837A; Wed, 21 Feb 2024 02:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="jfeB4qQL" 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 75B522574F for ; Wed, 21 Feb 2024 02:47:46 +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=1708483668; cv=none; b=ItV5YjmsCZqjkBQRsxDqnhFhGzrQa4064eh+4LLljYsBBTXRgSroy8u+JfyzivTGI5emAIDS7C4jACavxXDndwcRtAySCj7XvVT26Q4UY+yw6khwHeb1PhTnx2vlG+f4ikBkTFcUgje6mkgfulKHTqOrarsVZEFWVJixbboUeok= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708483668; c=relaxed/simple; bh=Z2c/ZC0mE9zQXa+ZDm7Ft9yFKRqOSGw+Q4ns0ZBkczE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OUEE7cRfXPI0Eki5Wu1J+0Lh0DnH1zXd83uwz8jw9Ln+g3+KhGCRfyh1+Sy7YL5VkpUGAqRtNPHHWM/KVVYpzfPTUH938D3osJY3zHeFndfJgbURwtKZTs+I+ZkXnjDtquNqvIKv/pg/bC6Yl87xDY1yq4erq18LQqJWVgZeek0= 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=jfeB4qQL; 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 (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41L2THVN024327; Wed, 21 Feb 2024 02:47:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=hS43JUPpBFkWaxKWv0yuFZnWSyCbqQIwNbs8b1w7h4s=; b=jf eB4qQLGcb/any9GG1oSqoaH5I46mIxlYZP9OK5qIzbMg1WwKFizQ57tyswQkKPCz 3Tnzj33iNOb3LgLGxv4TcBvIiXn5qAqwPUTcAQgTD6LmIf11YB8m7Hi6xT9h/i/+ cG2JEwdf4zw6DQjJS2e0OFHOeWrMsl/W1MNWYXEssbW4pVddQo+krxTVEAN2FdZg 2fqkd30pqEfHoPEhuM3+75pyCzZfFh7YNNejdpIxLix08DejfaIt6YQD07WAPpF7 CNpgEXldjslgR1n/Y1vQr5mF7kQYXhnusjoUbEUVWnRBL/wD8Ur37RdYxITt8hzI NmNwblxFy0ypYfN+IHgQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wd22rgsht-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 02:47:42 +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 41L2lf7h020105 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 02:47:41 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.1118.40; Tue, 20 Feb 2024 18:47:40 -0800 From: Baochen Qiang To: CC: , Subject: [PATCH 1/5] wifi: ath11k: rearrange IRQ enable/disable in reset path Date: Wed, 21 Feb 2024 10:47:21 +0800 Message-ID: <20240221024725.10057-2-quic_bqiang@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240221024725.10057-1-quic_bqiang@quicinc.com> References: <20240221024725.10057-1-quic_bqiang@quicinc.com> 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: -MOvkH73xWwHETPgGJEIy87gr4CORXML X-Proofpoint-GUID: -MOvkH73xWwHETPgGJEIy87gr4CORXML X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-20_06,2024-02-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 priorityscore=1501 phishscore=0 impostorscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 mlxlogscore=874 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402210018 For non WoW suspend/resume, ath11k host powers down whole hardware when suspend and powers up it when resume, the code path it goes through is very like the ath11k reset logic. In order to reuse that logic, rearrange IRQ handling in the reset path. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30 Signed-off-by: Kalle Valo Signed-off-by: Baochen Qiang --- drivers/net/wireless/ath/ath11k/core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index 922e67f8e04f..c78bce19bd75 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -1869,10 +1869,9 @@ static int ath11k_core_reconfigure_on_crash(struct ath11k_base *ab) mutex_lock(&ab->core_lock); ath11k_thermal_unregister(ab); - ath11k_hif_irq_disable(ab); ath11k_dp_pdev_free(ab); ath11k_spectral_deinit(ab); - ath11k_hif_stop(ab); + ath11k_ce_cleanup_pipes(ab); ath11k_wmi_detach(ab); ath11k_dp_pdev_reo_cleanup(ab); mutex_unlock(&ab->core_lock); @@ -2127,6 +2126,9 @@ static void ath11k_core_reset(struct work_struct *work) time_left = wait_for_completion_timeout(&ab->recovery_start, ATH11K_RECOVER_START_TIMEOUT_HZ); + ath11k_hif_irq_disable(ab); + ath11k_hif_ce_irq_disable(ab); + ath11k_hif_power_down(ab); ath11k_hif_power_up(ab); -- 2.25.1