Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp144183iog; Fri, 24 Jun 2022 00:43:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uRPvimQrfLPkDnfvYi60db8QCUtg7es4HB8dWG+c7UjN2mDUJXQMWfn/DI7EnPsc+hWZqw X-Received: by 2002:a05:6402:430a:b0:435:8ec9:31ec with SMTP id m10-20020a056402430a00b004358ec931ecmr15662230edc.248.1656056634265; Fri, 24 Jun 2022 00:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656056634; cv=none; d=google.com; s=arc-20160816; b=mZ5BUzQlQ8RSy0s2fFoR5cuOSKkTaNOoVmo6b8mRiPnymTkn86Oo/e+djJMeubL5nv KZIWeKHxjjKFzP8IR7PXWVHK1Cve1Gpl6L182BE08twdcaIrhZ/WhtlSLTnW8BeuMieH s7g9D3X2w4AdqLDho05y1Rg8Zi/v0JBKXpNh/WDASCXCPo6fRDPnVgs4ICfoCgNxQ6Gh igRYsTMt4IxHUB5AhPbD23HnXmyme/7A88oZlsVd0F+xt4OwFNSzZmk3HWmKk0ymf0Uu nUCf2DbTdjqdqkrmNRnWKlIxvANC+R8O8gSJpp6JD92DRbwa9aBGuTa7XLWMbR6TjUdC +P+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=snvblPvKjV1IKbOUXUELrOXw2vLdM8KVAMtXE83IZTw=; b=mdj1Xhr2sWyagkT19HxTj7KKDEr4IMQKZ4JPLAVLvdjrWP51iSv7paacK8qLDID1nq 3SaImqR/uYAPA83seIKN5vjZvk8g907VenTKHFLWuE5Ru/osR7Vq6q3cBwXPktbk6W+S ZzG/dq4rCORce0pEPAE+F9GJhTa+u4uMEch1murY+gyBTxoXgG92/5waCjBWKtfU5OSj IaudqaYFZIJTaI0RrpmtCfSbBEi+u/e2VHMYjX5bhon6yNIgYq7UMqkQM58UnhasJBud M8Xn7EpjR/XRTeH2Cw0RSbfHlXx8+Y340/R06MImXB975EjrWV59/QtwaaRBHQSIsJU5 NgDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=LC3ccEy6; 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 l14-20020a170906794e00b00716646dc05fsi248549ejo.860.2022.06.24.00.43.27; Fri, 24 Jun 2022 00:43:54 -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=LC3ccEy6; 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 S230431AbiFXH23 (ORCPT + 99 others); Fri, 24 Jun 2022 03:28:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230143AbiFXH20 (ORCPT ); Fri, 24 Jun 2022 03:28:26 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E4C434668; Fri, 24 Jun 2022 00:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1656055706; x=1687591706; h=from:to:cc:subject:date:message-id; bh=snvblPvKjV1IKbOUXUELrOXw2vLdM8KVAMtXE83IZTw=; b=LC3ccEy6Ook4yMaG3SlNFQ6AAWBazAzIkTZ2Autj2YWnicxOipIZbE1b uYvbYA8+zwa9WH9492LDJ1WPjh4JhJEocJXl66zRQbwdDCTxFz99WT/E8 kXsCQRSuOLCuEUbWTRDYYNikm6z6hHb95D3f1PkPzxQ8/KrsW+/5YxhF8 A=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 24 Jun 2022 00:28:25 -0700 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 24 Jun 2022 00:28:24 -0700 X-QCInternal: smtphost Received: from hu-krichai-hyd.qualcomm.com (HELO hu-sgudaval-hyd.qualcomm.com) ([10.213.110.37]) by ironmsg02-blr.qualcomm.com with ESMTP; 24 Jun 2022 12:58:07 +0530 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 4058933) id EC2C43CD6; Fri, 24 Jun 2022 12:58:05 +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, Krishna chaitanya chundru Subject: [PATCH v1 0/2] PCI: Restrict pci transactions after pci suspend Date: Fri, 24 Jun 2022 12:58:00 +0530 Message-Id: <1656055682-18817-1-git-send-email-quic_krichai@quicinc.com> X-Mailer: git-send-email 2.7.4 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 | 12 ++- drivers/pci/controller/dwc/pcie-qcom.c | 115 +++++++++++++++++++++- 2 files changed, 123 insertions(+), 4 deletions(-) -- 2.7.4