Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2587404rwd; Fri, 19 May 2023 07:40:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6h6BDSyMYAqPmR0efgZE6pjkBFelfPVpsqn7fL1YRaIGWwGYbi6P3tduBfaKWdhOwByF5p X-Received: by 2002:a17:902:7008:b0:1ad:edbd:8547 with SMTP id y8-20020a170902700800b001adedbd8547mr2427841plk.15.1684507240726; Fri, 19 May 2023 07:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684507240; cv=none; d=google.com; s=arc-20160816; b=uRHWExUBOkbCqVdP10JYa7AHG+7w5S5OQloeGmAFS+dgPmq1d6sPeyXbPM7wCPuAr+ vb3y4Q+nZOc0c2gcscMWhgcTUzp9lMP3lrRnGXsg31TVBeej/JEF9iCwJvExLRYAUM74 cH8JPAZm71eIeR0EYToqP14WU8OHWVb1Lk3gI42bww0tFRqttVYAMgEP7iLY2QBLjevQ v05C7T+61UngITzmvwXizpf+L8wPZGjQ9aMNqureYD0SOJDF/IkQO7bD9ygNvSSTjDrT /fVnMsKIHE+Ri2bE0vHUENdoOuQsnBWxdRtcTAVESaNrrRMtYqZFSFm8D7Ix7aoXRZ0R acJQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2i+4jZMYyJOuLHa5p2LrqOp9rYboDhqgn1MB/sFP3Yk=; b=FtjqgqUMWqcHxl/kWyIJkVfTmZMpgHoEnCsKQtDmYB1bVlXmqfNaoaY7XU4989Utiw 04TIoMLOPCO7i8BQOzwoeORHbXLX6flEyqJcozMS9O9VxRVmboagEekPE8/hdSJtzpvs o3epskdcYAGNz+FAuJAruDQwc+XZu3dbpyXH8ers/FskGoCdWtFr45qwKXWJ6hlL3FCq 8V9bCmaz9WNGzH4VUHWDNw91M/gtkVp8OhTqfUX0VZRV4ki528fCZFqAgn60tNLLNqsU LQfIl+RcStQg5we/eAYLTljinWhFFgtSwUDHDDo+eVTi6j9DvUiOIDZ5T6Le9k/XuCKf ju2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NGH3s5VW; 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 t21-20020a170902b21500b001a9930c626dsi3539370plr.273.2023.05.19.07.40.25; Fri, 19 May 2023 07:40:40 -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=NGH3s5VW; 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 S232041AbjESOb3 (ORCPT + 99 others); Fri, 19 May 2023 10:31:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbjESOb2 (ORCPT ); Fri, 19 May 2023 10:31:28 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FB34137 for ; Fri, 19 May 2023 07:31:27 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-253570deb8dso1881945a91.1 for ; Fri, 19 May 2023 07:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684506687; x=1687098687; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2i+4jZMYyJOuLHa5p2LrqOp9rYboDhqgn1MB/sFP3Yk=; b=NGH3s5VWcjCYJ467VCymIG56S/3e59VN9TouKrORlz1kUH9pDmPg+OhKrB7IREV6Rp kyfAqSlCnfHExdp468iMVrISs6R+GMlbQ1CNIlcI1H05fV8MvYoZ8rVO2Mb4OV5wKw3v I2bZ7wlj/bmDqIN8+0fwdCIE2/PYo+5mu5RzVhFiJ2YiTMpKd4F2lH6Vtg6aFyRA4ILl rv7jDg/JBqRVP9kP83q9iGSkkC1pc5qJ8m3npI278unfvFayw6rzteHKvQ45jeEz1yel WiqQADrAXSBPKyRx3xMRGcyYlXSv51Ab5b6XCaKL0GFBrwacjOCTB2sJDic4lu1vexJt qkWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684506687; x=1687098687; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2i+4jZMYyJOuLHa5p2LrqOp9rYboDhqgn1MB/sFP3Yk=; b=CaORO92FG6j4OLEwqcm377+68tBzZo2yYDCE8xC++VNqgwlbJsfc/p60MG2Y1ssHK1 A9rJhX1/V+x6FBuSu/kiHgy/c3aTXUgfr2Y+Y1ju6eFUBsuYcw6HrAM+Kp+2B4e5Qq1o SeM8v/2on5d8GlUdBC/Vy0rO/OBrIpNjNWg74As1yXsQnbP5Z6DU4mWwVwF8mIuC0qgE 0KcNMzL3yrSdilphlgr3O21fJG0Dc6hd3BQa6EK9aDGPvLYA1zGDKbxz6283RY63RFA7 TTCYxiX2yChsxMGUD5FMcA4j2LjoI+5hDT66Zf/j2YpTlpPpYdrQZvgUXNiiTMuNyTLc 4Cew== X-Gm-Message-State: AC+VfDx2YMj0Rrskfx2Snydv4/gtsHUJ4xqKMsiU+E154kKKWTHpooGs F4m6OtTycb3EsXlyXNndsL+7h0DVUyCvvEIBtQ== X-Received: by 2002:a17:90a:c712:b0:250:2192:1bff with SMTP id o18-20020a17090ac71200b0025021921bffmr2556538pjt.23.1684506686731; Fri, 19 May 2023 07:31:26 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 07:31:26 -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 0/8] PCI: qcom: Do not advertise hotplug capability Date: Fri, 19 May 2023 20:01:09 +0530 Message-Id: <20230519143117.23875-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 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=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 Hi, The SoCs making use of Qualcomm PCIe controllers do not support the PCIe 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, this series clears the HPC bit in PCI_EXP_SLTCAP register as a part of the post init sequence for all IP versions to not advertise the hotplug capability for the controller. Testing ======= This series has been tested on DB845c (SDM845 SoC) and Lenovo Thinkpad X13s (SC8280XP SoC). Thanks, Mani Changes in v2: * Collected tags * Moved the HPC clearing to a separate function and reused across different configs Manivannan Sadhasivam (8): PCI: qcom: Use DWC helpers for modifying the read-only DBI registers PCI: qcom: Disable write access to read only registers for IP v2.9.0 PCI: qcom: Do not advertise hotplug capability for IPs v2.7.0 and v1.9.0 PCI: qcom: Do not advertise hotplug capability for IPs v2.3.3 and v2.9.0 PCI: qcom: Do not advertise hotplug capability for IP v2.3.2 PCI: qcom: Use post init sequence of IP v2.3.2 for v2.4.0 PCI: qcom: Do not advertise hotplug capability for IP v1.0.0 PCI: qcom: Do not advertise hotplug capability for IP v2.1.0 drivers/pci/controller/dwc/pcie-qcom.c | 73 ++++++++++++++------------ 1 file changed, 38 insertions(+), 35 deletions(-) -- 2.25.1