Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp453848iog; Wed, 29 Jun 2022 03:47:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sn1Fea4WpfwPhJoeUMF+t3Kt3ImCiCgxU2JH9BcDtvIIC0KiECfJpXijLpaWDrvURkOiTy X-Received: by 2002:a05:6402:2312:b0:437:69ec:adef with SMTP id l18-20020a056402231200b0043769ecadefmr3340376eda.366.1656499670813; Wed, 29 Jun 2022 03:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656499670; cv=none; d=google.com; s=arc-20160816; b=p+qHC1PHtgLodGMc0xxVayfzzLes/4MPMFzhwe6C3xgqaXpZcXYB9U3LtWgS+r7Lxl AljfGYb4cEXFnByXMascnU4wqpaAIwi2VWvHUJqzBra0eg9y9N5p+w4VOHs72g0l5MBp TvvV5e4YFpAqG+JzfmYi9zo+YBPJdwUHKcmoF4P+/MULuQiqkc98491X2dAiYG9usdIb amxlj4ZSJyLlYQxApNxEPsBG+UBM3W00WpPHVg7t9fZ53ybbY5jsVwM9ZuxOhIvHQiz/ 9ludAgHkwCOtCGnPn5+7bC9x//UPfERrtwMCKcKtX/wMA9wUCOIAdz7yhNlLSH2U6aPK X6Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=P4AGhikg620X38VfSmRxFDdGgI2V4TsuWo+pgD/SRbs=; b=xlWTDe6uWkuhrfZ2Gym0Nty6rZrHrz9PoUK5coWxefBBtwDutMPTcm9+/SK6Jlzt7I Z8q0xe5RXTRICWwo0Bjj2j1cGhfwpp0Epv4EyRsA5+gTdGkJ5syazkopG9apd2vAYSee njwq9/mdezzn1bZaWzMdrLzdaO9x4RbcP7HpswbZNYlAuAcSp95QaZQvOO0T3+t6HkWx UhYzZp5Yg1IYMvlnQb1KkpiqDkC27AVp1pS91cptxcN7kATDllfiBlW67Wc/dkvKQAuP oE5pmF2kVHiArcw2LZk+0Q7fzNYDvYo6v2tCpK7SQ5A2f85OzYr5sp3QVuEWkfw2Vcal yDwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=C5IADQ+l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z66-20020a509e48000000b0043586c7de3bsi18950709ede.121.2022.06.29.03.47.24; Wed, 29 Jun 2022 03:47:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=C5IADQ+l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232920AbiF2JeD (ORCPT + 99 others); Wed, 29 Jun 2022 05:34:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232909AbiF2JeB (ORCPT ); Wed, 29 Jun 2022 05:34:01 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF7933B00B; Wed, 29 Jun 2022 02:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1656495240; x=1688031240; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=P4AGhikg620X38VfSmRxFDdGgI2V4TsuWo+pgD/SRbs=; b=C5IADQ+lIoOmhUI85w/Xmi7gXKonghtApt37qcqd84svCex5pZQEzzAY 6zqhjG1Vnn3BkIWc08KiUwIM1pWOZLakTNdoEWlrXou22QR0I4wGvScLa khv/nWJRtPNxXvxxaNZUqoPhgkR0mAHurQ7U6fuiokNnNJi2XInKFRf7u Q=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 29 Jun 2022 02:34:00 -0700 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 29 Jun 2022 02:33:58 -0700 X-QCInternal: smtphost Received: from hu-krichai-hyd.qualcomm.com (HELO hu-sgudaval-hyd.qualcomm.com) ([10.213.110.37]) by ironmsg01-blr.qualcomm.com with ESMTP; 29 Jun 2022 15:03:39 +0530 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 4058933) id 628F5421D; Wed, 29 Jun 2022 15:03:39 +0530 (+0530) From: Krishna chaitanya chundru To: helgaas@kernel.org Cc: linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_vbadigan@quicinc.com, quic_hemantk@quicinc.com, quic_nitegupt@quicinc.com, quic_skananth@quicinc.com, quic_ramkri@quicinc.com, manivannan.sadhasivam@linaro.org, swboyd@chromium.org, dmitry.baryshkov@linaro.org, Krishna chaitanya chundru Subject: [PATCH v2 0/2] PCI: Restrict pci transactions after pci suspend Date: Wed, 29 Jun 2022 15:03:32 +0530 Message-Id: <1656495214-4028-1-git-send-email-quic_krichai@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1656055682-18817-1-git-send-email-quic_krichai@quicinc.com> References: <1656055682-18817-1-git-send-email-quic_krichai@quicinc.com> X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the endpoint device state is D0 and irq's are not freed, then kernel try to mask interrupts by writing in to the vector table (for MSIX interrupts) and config space (for MSI's). These transactions are initiated after clocks are getting disabled as part of PM suspend call. Due to it, these transactions are resulting in un-clocked access and eventual to crashes. So added a logic in qcom driver to restrict the unclocked access. And updated the logic to check the link state before masking or unmasking the interrupts. Krishna chaitanya chundru (2): PCI: qcom: Add system PM support PCI: qcom: Restrict pci transactions after pci suspend drivers/pci/controller/dwc/pcie-designware-host.c | 14 ++- drivers/pci/controller/dwc/pcie-qcom.c | 116 +++++++++++++++++++++- 2 files changed, 126 insertions(+), 4 deletions(-) -- 2.7.4