Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6524322rwd; Mon, 19 Jun 2023 08:25:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VDZE5OXxqUKETf5gFN4WDeQ+VRrRDyNdCRH1zwhwuvIwJSJ4TJvurHm+qvnLY5aOAhsLz X-Received: by 2002:aca:bd41:0:b0:39e:c841:cdba with SMTP id n62-20020acabd41000000b0039ec841cdbamr3156811oif.32.1687188325829; Mon, 19 Jun 2023 08:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687188325; cv=none; d=google.com; s=arc-20160816; b=kEkHzzZzcDtzCJQ/m3iOokbyfCQ5FT6tsLoIviih/VDr5b2B2NG7fCRhbbKyjcZ+pf tQmmhkXF7dpJClkHSa+nQigmX61PkMHWQTUj5+arLEHJEBgu2erMpAUkXGcxMfKVkn83 KpLgX5RDt908tl8SuauUHAA0UCWmp4CxbOh7qsJHpB2dyN1ALs3Vuh/9ne6/BfO85v8h h9nAKjxq7e3D0zGJKfQfYz/i/+y83HIUOyC4vC81E0MjyeWNjKcu0oJessEypszqxaUn 8nKk+6jA8tQgvda5Ot4LTGX2UbIN+yGiLsRp0vlz9faBBOOoFu4uRBdySH/PTtYgfVGi 4lsQ== 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=BAHgbKUGLDFGyzp+XWYZ2sseIunYBsYQIO/Xldf05CU=; b=euBObUXNCPxcNtuJtq1+G2kseeUCcW33YK+aWdBUwmGF4BOyzhfHNDoeJNFqh1tsWv 3brXHHm2bafqP/ERykn6Q+Z5eVmpBqNkYeXtgV4dgmxMvY70VnR5naIBjF8FxMaqywUa ISTZxgtFTiscpmn7bM2iO1zLmTGZpTOvjHPmqFqoPBbNpr/cHYDMyfJ+HyoqEcHeLCRB lp9ERsM1M8Uul0heejFFezxgSj0tzXDulRvvOELxPC4S8ZFBBEdc36+uz4HyXCtV9ilo OMTApCa2WPoP8DQpCryuPegtFk4cQrfY1vI/Y7KFaWGib6rjorlAOodmwjL4WFfyxkbF rNPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XvdhBRHX; 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 27-20020a17090a01db00b0026094c23d00si2104278pjd.45.2023.06.19.08.25.11; Mon, 19 Jun 2023 08:25:25 -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=XvdhBRHX; 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 S230305AbjFSPGX (ORCPT + 99 others); Mon, 19 Jun 2023 11:06:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231555AbjFSPFY (ORCPT ); Mon, 19 Jun 2023 11:05:24 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADBB610FE for ; Mon, 19 Jun 2023 08:04:52 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-25ec175b86bso2339538a91.1 for ; Mon, 19 Jun 2023 08:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687187092; x=1689779092; 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=BAHgbKUGLDFGyzp+XWYZ2sseIunYBsYQIO/Xldf05CU=; b=XvdhBRHXtdzN60JPoHiXZGxe3Wk8p3gEVy+80P/yCIUnn5q/UjEz6wGlLUXO/Tcp/B p8G1lcxkxYlP5xBp89pAbZZsu5TTC+qOgOXZx0qANDXGrqsKG5jlWFQVYeQMgog4GiVg wdxkf03RP9va75x46RLsvNHYZv9BMqmZ8LQqPta7Z6Zq8i+eA+ZPRky6UY20MUYFYLkr AiJCUirnH8hMizZurVOfFD4mTj3SdBbkydnp+kTqBxXNiyFRO5NJsTl5mYeFNPA5V9gf rSIvT9+E06Kh8dESXnCMURATxRR6WFsSxEu8qtTmzg8ahZcvAundvWcd7CY1HHfnvrf3 CsnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687187092; x=1689779092; 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=BAHgbKUGLDFGyzp+XWYZ2sseIunYBsYQIO/Xldf05CU=; b=RfWv/FxiTx/uYCqM6TamMbcZlMIqYb2LabKtlDsgGeN/axFPZhv3hoOmRTaViCLCf+ qgxomD7tDq9t9mr4+DA/swekWYzqC+nxn/nKTaCpbyy702kn2FM4UFhBJXxmZV6T+/nS Et2C8dLjJbYjRIdU8PmdHSu3sleCqJrZNdTRU+uyJ3+XdPzm5haNYIthhnQaU1FsUAq5 U8xoSlwg4tcrKE3F2g00pjB1+zEUd9Gt5iKGn5D9hGimZ+UqvqdTK+M++aL1sF5ao9tF Vi4tpqwuIGC6owpzzlyfy3GRorOFAvUQO27LE3bTORNVGOXxfAhDdSD6fiXOEgxI6ky2 w9rg== X-Gm-Message-State: AC+VfDxMe3LN5gzUZEL30Lff95RDkMu+u6VDo5XAaCfD+4ICzbRDVo+R nlj2OCHgBlbucu2wq3D6MRKB X-Received: by 2002:a17:90a:df95:b0:25b:e216:bc15 with SMTP id p21-20020a17090adf9500b0025be216bc15mr10269006pjv.23.1687187092079; Mon, 19 Jun 2023 08:04:52 -0700 (PDT) Received: from localhost.localdomain ([117.217.183.37]) by smtp.gmail.com with ESMTPSA id 10-20020a17090a19ca00b0025efaf7a0d3sm2765480pjj.14.2023.06.19.08.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 08:04:51 -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, Manivannan Sadhasivam Subject: [PATCH v4 9/9] PCI: qcom: Do not advertise hotplug capability for IP v2.1.0 Date: Mon, 19 Jun 2023 20:34:08 +0530 Message-Id: <20230619150408.8468-10-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230619150408.8468-1-manivannan.sadhasivam@linaro.org> References: <20230619150408.8468-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 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 v2.1.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 612266fb849a..7a87a47eb7ed 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -438,6 +438,8 @@ static int qcom_pcie_post_init_2_1_0(struct qcom_pcie *pcie) writel(CFG_BRIDGE_SB_INIT, pci->dbi_base + AXI_MSTR_RESP_COMP_CTRL1); + qcom_pcie_clear_hpc(pcie->pci); + return 0; } -- 2.25.1