Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2114011rdb; Mon, 20 Nov 2023 02:16:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtJT0qdSP84SDRzvO3MIbaIGlS9jWnEyow3K2pf4zTzwUeNIvxyQdxPJGaAapKQzRuvGsJ X-Received: by 2002:a05:6a00:2e92:b0:6be:b79:eca with SMTP id fd18-20020a056a002e9200b006be0b790ecamr9335957pfb.32.1700475410339; Mon, 20 Nov 2023 02:16:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700475410; cv=none; d=google.com; s=arc-20160816; b=AQ85RWUxC/X0hrn8PqHDCgoqD6dS9lwbLmSuCM4CP2NSrMc1K9n7Wa4f7W+9/aTTVu IceeBDxuvXU0zGz9m2r5NMfsJf7bWhgihH4558TuWhFtdXh+xa/1kORguJAUpYSdlWCr jbqJzhydB4t0lbTVySXo3hEuTXqxWAaao/7+TbIiOjPTtdFI224jpPJiA8F9p+BeTMg3 t183OFbc3pG/uch/23FzHdVhYSe7/iyYaI+8NPL+m3zVipAxeXYythgYC2Htql1bjSHL iC0jmH1Zs2TZok4H6oAFiV9zWrKxGR68hg1EyUi/W0TFXLOVbMal/42/1KGGclDtakwZ s8KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OZjsgw8SYxGJtJji937J6xR5BP2x6ahypt4nDX8i44Y=; fh=nsXMNwyQ6Js4V/BswY1tH4B32D/qQcO3q9PUs38uuf4=; b=coMLhTN0fPnB4prwHVQOYQJCoNTEDwbBwv6klq3QbSORuxksDfk3rcr2oRRoj6owlp GTg3HxCO98aaPUePW0alnagMtEoiQiym8su9T9ghSo8X23Dm/4vEt0A+byTm/CcYrPn+ D5iIw2by7gRDW/zMFu6VKunMcp1eFig/7sHEl+tOnxDeiRoBUtOsR14CgGQZZ2B5M1/Z Z68rDSFMM5p9UdTrG3mxiWGyf0WTD3WQIpnBbeRTLkoFdHL9Kp55gCfaUaHzxbms81gE TjXVIDX+Z5ZTXd6TDzbnDHX5RYx+ucW3pFi4otjgpvEk0CuYLPZS+ItFSGByEhHp5Ltk mYkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MLj5LiR1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id v6-20020a63f206000000b005b95ccd1b4dsi7024859pgh.82.2023.11.20.02.16.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:16:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MLj5LiR1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9367D80A28E3; Mon, 20 Nov 2023 02:16:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233052AbjKTKQU (ORCPT + 54 others); Mon, 20 Nov 2023 05:16:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232986AbjKTKQT (ORCPT ); Mon, 20 Nov 2023 05:16:19 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D29DEB for ; Mon, 20 Nov 2023 02:16:15 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AKAG8Ig028325; Mon, 20 Nov 2023 10:16:08 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=OZjsgw8SYxGJtJji937J6xR5BP2x6ahypt4nDX8i44Y=; b=MLj5LiR1DuIwXgDHiNdcPjzZ9fiQxBKWJVB8WBP022+W5g2bF1zMKDXGsTatJe3OaU4v zy8/eGtuHvqZEEoRM+8S++FgBqs1ck2UydT1M7ZcdR+bi7MMmzy9b6Kvdv6/WWFCq38C +PRdwd8W3foOQ59KybCmo5hLD9T9TFTgBlmaBpx2wXwrC5LNB1+lHc4Oxu0uCGFYJJ6W qLDLcFu69D9HvzuOMy8ShtdfA6NUGzqV5SFHLNGBmKYqBG+/swgH6e/qYiK/vVr63NQ7 v0BcdFnFvAKZt3Mt3Y93wfXKpabsxHVv41l/gCYq97lxye3s62lHK11ADdMune3sZzpM bQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ug26trh4u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Nov 2023 10:16:08 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3AKAG7dt019758 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 Nov 2023 10:16:07 GMT Received: from yk-E5440.qca.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 20 Nov 2023 02:16:05 -0800 From: Kang Yang To: CC: , Subject: [PATCH 6/7] wifi: ath12k: do not restore ASPM in case of single MSI vector Date: Mon, 20 Nov 2023 18:15:42 +0800 Message-ID: <20231120101543.4369-7-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231120101543.4369-1-quic_kangyang@quicinc.com> References: <20231120101543.4369-1-quic_kangyang@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: gTqnVcNcOPHQKGV4dKRBr2VOZogjJrpp X-Proofpoint-GUID: gTqnVcNcOPHQKGV4dKRBr2VOZogjJrpp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-20_07,2023-11-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=825 priorityscore=1501 impostorscore=0 suspectscore=0 clxscore=1015 bulkscore=0 spamscore=0 phishscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311200068 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 02:16:20 -0800 (PST) Current code enables ASPM by default, it allows MHI to enter M2 state. In case of one MSI vector, system hang is observed if ath12k does MHI register reading in this state. The workaround here is to prevent MHI from entering M2 state, this can be done by disabling ASPM if only one MSI vector is used. When using 32 vectors ASPM is enabled as before. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang --- drivers/net/wireless/ath/ath12k/pci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c index 4484bac18f4e..3850331438de 100644 --- a/drivers/net/wireless/ath/ath12k/pci.c +++ b/drivers/net/wireless/ath/ath12k/pci.c @@ -1094,7 +1094,10 @@ int ath12k_pci_start(struct ath12k_base *ab) set_bit(ATH12K_PCI_FLAG_INIT_DONE, &ab_pci->flags); - ath12k_pci_aspm_restore(ab_pci); + if (test_bit(ATH12K_PCI_FLAG_MULTI_MSI_VECTORS, &ab_pci->flags)) + ath12k_pci_aspm_restore(ab_pci); + else + ath12k_info(ab, "leaving PCI ASPM disabled to avoid MHI M2 problems\n"); ath12k_pci_ce_irqs_enable(ab); ath12k_ce_rx_post_buf(ab); -- 2.34.1