Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2587518rwd; Fri, 19 May 2023 07:40:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fb2ExyY2sgHYUCDXwRfIZHLpiXCXkflxqLGoThFigFzoAwE5BxYvCPyBCoANsnrsEO6Hd X-Received: by 2002:a17:90a:66cc:b0:250:981f:365a with SMTP id z12-20020a17090a66cc00b00250981f365amr2645696pjl.23.1684507246841; Fri, 19 May 2023 07:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684507246; cv=none; d=google.com; s=arc-20160816; b=bzwFhXXNPrJSI1QFREIRlrWZKzPI9F+REQDm4MB8M8e4gkknOnqOArWyNaxsBcOaFd RuV7SRl163PHHSTFvvak3h9YYXxd3C2nUJ012XYrjdpgEGRlKKy4kQlOSg436dsfT4FX fLQJ3LGYCMF8dtNSlcEfSVt1VsF2RSSNXtuG8rGrntVzSRFF/pHp4jvC9qbWk7AF0rV5 MjpcsEJpd9L0Ykg1HVKXDwNHN+qzJIJCOCNDO3mgh2b51tTSNlA39uW7xOca7r7ck+/f 9kw5wjSFjDw6vn5uFCYvlrpFyn0b/4lQmmQL3ZYLJCRvux27hmSxiJZjzlrK9Yf3FmQE qFUQ== 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=bkQkFXSrqR5MDMbqBcH7Nxin9P2rGGa9soJkqC/yxfY=; b=aIrWQf6EgG7OCQw2NCAkBHIBJJocPw0rDI/+1+lVJCvITAcFOlHoSsaangF6evRLX0 Pj6SmsXRwWF2OJY9w7aY9OTE/1ksmR9KehfmCaFwVbMHyU4NRYdL0AeJGyiIoJ8snPRu Ae1P1ZxzkVOA6z+x3koqW51ckjQ23FJuCGrZiGa+f/ER7YoSPbsDCMubhlC1eUd+Knuq O5S3fqM+UJh2ZQrdg2eqmLoUsNFrAeDnaJCL7y9cRLma3I8ofqRGvNDcj2ZNuyr0RsvX HNVvZKC6pcXebPvFJZKpy1Bb4IjOYgMlig1RFxVoLfk18DkLYJxYdTTGnfkHEfRMqHKj z6KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bwm/X4pM"; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i20-20020a17090ad35400b002496cedea8esi1876785pjx.24.2023.05.19.07.40.31; Fri, 19 May 2023 07:40:46 -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=@linaro.org header.s=google header.b="bwm/X4pM"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232114AbjESOce (ORCPT + 99 others); Fri, 19 May 2023 10:32:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbjESOc1 (ORCPT ); Fri, 19 May 2023 10:32:27 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 579811727 for ; Fri, 19 May 2023 07:32:00 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2536b4b3398so1522389a91.3 for ; Fri, 19 May 2023 07:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684506719; x=1687098719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bkQkFXSrqR5MDMbqBcH7Nxin9P2rGGa9soJkqC/yxfY=; b=bwm/X4pMr8MwYBpFxgbtrdPEnQVZlktmQcTkB5+TrS8zlCJkEN8VDgewXp8Ju/XmsW mobigOKrqd9SV8PvXBlhoPTyVhviDEV/X5tvPoZcG7SQSDEtVrB5SKFi50u+ATW1k61k oLdabeZhinepamdwCimBMJjcOVb0DTPdK3R0eVrNpt4M8hQ8DZVhwz3gAq3Jwxle6E6/ KUTsDj3ReTi0IVug0CTJxF3n+zApxOsazseIcWr30rl4JA4KzXosl6O57j7B1JKTL0Zf A0U9p9GQ3P5mosV8zHs6YZO8DrMqALXEybry6CV0Ad1eLs5h2UjgqZf7twHncsie+rTn RCnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684506719; x=1687098719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bkQkFXSrqR5MDMbqBcH7Nxin9P2rGGa9soJkqC/yxfY=; b=jefzzTjuL/pUqN2Wo8K2YporCCkVhqZK7mIuYU7hNp49cpCSMlE19pzyjN1Dg6sboE 0yb3KVZK6joADXSZAdY1ZzBQOsLtH29IfwrMfvY4rgXhXupOx/ZAGMUNWRen2fTdgL6a G3PR6i6AdbEz65jzGCJHRFZSJnBuyJOpNSXT+60VNJEIzPB5NRLA/N5ldQM0ev89uZGo CNe+WlEE8H6NgwqhvJs9uIkHPVHaRjMcN5/fZyh4HkknZFvRHFCVRLd47q4TKVyudixn R+uMw2l06TVJUWgHsu4+0oMwwTz2UWqVwMmC8zK4nCgHFUK0Up6f0a/0BfnktOTkKJxO 6gNQ== X-Gm-Message-State: AC+VfDzf7rJ7Se8mADHQurBbnVExwtSJjfwPSxnMXEmr9uATBVgTl7x0 hJ39e1hnz+kA3H2ZMfAHGOc0 X-Received: by 2002:a17:90b:46c1:b0:250:4847:426a with SMTP id jx1-20020a17090b46c100b002504847426amr2284620pjb.11.1684506719250; Fri, 19 May 2023 07:31:59 -0700 (PDT) Received: from localhost.localdomain ([117.202.184.13]) by smtp.gmail.com with ESMTPSA id 30-20020a17090a09a100b00250d908a771sm1634845pjo.50.2023.05.19.07.31.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 07:31:58 -0700 (PDT) From: Manivannan Sadhasivam To: lpieralisi@kernel.org, kw@linux.com, bhelgaas@google.com Cc: robh@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, steev@kali.org, quic_srichara@quicinc.com, dmitry.baryshkov@linaro.org, Manivannan Sadhasivam Subject: [PATCH v2 7/8] PCI: qcom: Do not advertise hotplug capability for IP v1.0.0 Date: Fri, 19 May 2023 20:01:16 +0530 Message-Id: <20230519143117.23875-8-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230519143117.23875-1-manivannan.sadhasivam@linaro.org> References: <20230519143117.23875-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 SoCs making use of Qcom PCIe controller IP v1.0.0 do not support hotplug functionality. But the hotplug capability bit is set by default in the hardware. This causes the kernel PCI core to register hotplug service for the controller and send hotplug commands to it. But those commands will timeout generating messages as below during boot and suspend/resume. [ 5.782159] pcieport 0001:00:00.0: pciehp: Timeout on hotplug command 0x03c0 (issued 2020 msec ago) [ 5.810161] pcieport 0001:00:00.0: pciehp: Timeout on hotplug command 0x03c0 (issued 2048 msec ago) [ 7.838162] pcieport 0001:00:00.0: pciehp: Timeout on hotplug command 0x07c0 (issued 2020 msec ago) [ 7.870159] pcieport 0001:00:00.0: pciehp: Timeout on hotplug command 0x07c0 (issued 2052 msec ago) This not only spams the console output but also induces a delay of a couple of seconds. To fix this issue, let's clear the HPC bit in PCI_EXP_SLTCAP register as a part of the post init sequence to not advertise the hotplug capability for the controller. Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-qcom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index e6db9e551752..612266fb849a 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -521,6 +521,8 @@ static int qcom_pcie_post_init_1_0_0(struct qcom_pcie *pcie) writel(val, pcie->parf + PARF_AXI_MSTR_WR_ADDR_HALT); } + qcom_pcie_clear_hpc(pcie->pci); + return 0; } -- 2.25.1