From patchwork Wed Dec 23 03:02:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Huang X-Patchwork-Id: 11987579 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DF84C43331 for ; Wed, 23 Dec 2020 03:04:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B2FD20705 for ; Wed, 23 Dec 2020 03:04:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728818AbgLWDEP (ORCPT ); Tue, 22 Dec 2020 22:04:15 -0500 Received: from so254-31.mailgun.net ([198.61.254.31]:30481 "EHLO so254-31.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731718AbgLWDEK (ORCPT ); Tue, 22 Dec 2020 22:04:10 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1608692626; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=I1QNljUE58AFHH2SABSXPPFW7q2xOYSS3wHHUKO0u2A=; b=AtchYFDU/5d622JraGE4+rAuHSsrOT6esEi3BoN+sCdWneX1Cc8Ev2cAFmNlVqQU4XhWrS9k zs17gUCv1Fi8buXG9NwpKy4Vk/eTpuFJpZY9aNecgVFFkJjk7du0G/l/lfVIsdAq+WE580fJ iz+8SJVplPq3S7TopfmzEiUsT8c= X-Mailgun-Sending-Ip: 198.61.254.31 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n08.prod.us-west-2.postgun.com with SMTP id 5fe2b351cfe5dd67db33bda6 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 23 Dec 2020 03:02:41 GMT Sender: cjhuang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 72BD7C433ED; Wed, 23 Dec 2020 03:02:41 +0000 (UTC) Received: from cjhuang-Inspiron-7590.qca.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cjhuang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1E9B6C43466; Wed, 23 Dec 2020 03:02:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1E9B6C43466 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=cjhuang@codeaurora.org From: Carl Huang To: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Subject: [PATCH 6/6] ath11k: do not restore ASPM in case of single MSI vector Date: Tue, 22 Dec 2020 22:02:25 -0500 Message-Id: <20201223030225.2345-7-cjhuang@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201223030225.2345-1-cjhuang@codeaurora.org> References: <20201223030225.2345-1-cjhuang@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org For single MSI vector, ath11k doesn't restore ASPM as the MHI register reading in M2 causes system hung. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang --- drivers/net/wireless/ath/ath11k/pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c index a120d7c..8c6147b 100644 --- a/drivers/net/wireless/ath/ath11k/pci.c +++ b/drivers/net/wireless/ath/ath11k/pci.c @@ -1119,7 +1119,11 @@ static int ath11k_pci_start(struct ath11k_base *ab) set_bit(ATH11K_PCI_FLAG_INIT_DONE, &ab_pci->flags); - ath11k_pci_aspm_restore(ab_pci); + /* TODO: fo now don't restore ASPM in case of single MSI + * vector as MHI register reading in M2 causes system hang. + */ + if (ab_pci->vectors_32_capability) + ath11k_pci_aspm_restore(ab_pci); ab->ce_irq_enabled_flag = true; ath11k_pci_ce_irqs_enable(ab);