Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp112234rbe; Wed, 28 Feb 2024 14:03:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUCuAVL7O5j4GtBHOc0Rc0tuUXQOFrT40RKA10RlC5ZtvN6bsHzGmgRdhHcBvBHoiyujHBGjUWooi5bSJEXmnkEtS6o35pT9inPb5NK7A== X-Google-Smtp-Source: AGHT+IHoTuFDm4YR3JgH98TnQGMf5gSZMSMP4+MLNlzwKTXfh7j+/nUTRdFbeeI60AbcXikb7aHO X-Received: by 2002:a17:906:3557:b0:a44:3bec:20a8 with SMTP id s23-20020a170906355700b00a443bec20a8mr45466eja.76.1709157824431; Wed, 28 Feb 2024 14:03:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709157824; cv=pass; d=google.com; s=arc-20160816; b=ZgwJ+3aNMoeqqDAbMSe+ptdtinur7BelQexPyIq8JYhc+ma3k4FAF6vGpH2EY8pTNQ DjjV7nOYWJklFAbF7oCN1Efo/hJ0SqNQ0ZyctnNKjs66mnRQPboPfy0l7xODU+NcIZPP bnpiylbE/DBEygpl8UhlDC/EGJXoNphnlWejzn1v9dENzlGGZHA6Au+Cb0EJKQelkJ3v UbSj0lPp650rge95Y7YqFKHIy107/Goa/8G5/JS7zZfrObTIwAzxWldD+JWpiPdrI/ig pLcifX/xZcYMjV+4sY1Gm/kuJlsOFDBcZOM78CfpEq83OYbBW1YGevgpVw1vnQLLfZfJ jZlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=4Xbr625DT5tzBhxnofC8n/COrgrg4rW/m1VcZcprphQ=; fh=Lffo4JwXplTCc4dVyG+gjRWI7J2a+RI4EPfjOfI50cg=; b=aSHzkFUttYTaptZjv2cvobGMRKlx06D/4xQcEHJ/NAC3uXnN2JB1obeIEKmurtYc6X 10Q7m7cvQUpaNfaPf4FvtFgQkoca/lxVAWlubaLwLSY/i6lkCwVwnugk1mBYw0jx/H9p Jg6UzhIdaR8CaxGQg6m85ocPURh6FNJhUMJpqqRFxGNY+8xx0rrVHCzTEhaS2vd/M8S8 bZhCMXGt6KCD9Kt4H4MNSiyTCQK+XuMgGgyK8HluECq+8cDWqZoeNsjQQGnHh84dFnsH 8PevIwJlhAx+A2oa9kYZ/p2UFUxhQWzSnLdYemDqEuFkDPdGRk3iAJ7eNBHFihTVekTc MFaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mSjD+Abf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-85766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hs14-20020a1709073e8e00b00a441d7b72f2si469134ejc.226.2024.02.28.14.03.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 14:03:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mSjD+Abf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-85766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 33B971F234BC for ; Wed, 28 Feb 2024 22:03:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7901D76EF8; Wed, 28 Feb 2024 22:02:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mSjD+Abf" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B5C97443C; Wed, 28 Feb 2024 22:02:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709157737; cv=none; b=iMQTqX0ledwy51TUvWow4iHwitZSt1cj8Nj5zPJWDhRTLZxYe7/9m2jEy534/GiA3tbrBbgHEmVGsZtGWOSzg67etAx/7PTjCuI47HR2ctrHytWCrqEdF+LzEZykamV+PG5hwIwwqkGHcktzMcom3Q+28336QPieYHufmO2ueCI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709157737; c=relaxed/simple; bh=gPOdghli+9QBbrWalwVFo9yVmHQwrDvufi1/D3sjuJU=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=dwHUWGupJSIrr9j6MdQD7UpnUMBSSoc1xn1fGwQtN3cWIjxY7Yxi6wgO0/1H4NY3TvZAlILDCGkpg//KgWe2NvklJqdRSJ9mO2yFov+L9wLZgxSS8zcYes+1yYHJxL5Fd4o+Co+moqk5FMN6N7VvgYcziCUYdphxYhDziwtn/8A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mSjD+Abf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7408C433F1; Wed, 28 Feb 2024 22:02:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709157737; bh=gPOdghli+9QBbrWalwVFo9yVmHQwrDvufi1/D3sjuJU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=mSjD+AbfYXIBYbQ4bhnujqShmhMYIuSgeohNkRNuEha5uRrMMtmh9NSmoiBkanSSH pzx8U1uk4eCfRXmGj1u0D82Vr61lA7o1701VRvmrp5NAH7K15iRBqu2rPYVQnqKTKt OF0S37fJftNMBe0q+Rbv6zdrP1F7B9TMwICmtuwKp0c3uhNactpNOtSwB0QRI17zTR 4083jOeCzOzVgFyWsK9i124ivPvp5QbClQ6grbp3rAyQXGLg9Z+oveKbkEnZNaiIzp dS47NLmnygDe4Ue9p+AyQGTBEJtDVbdHv9G9TJ18ghN679o6bUt0+L6ugQWdZEvT0w QTTfj64E6EjbA== Date: Wed, 28 Feb 2024 16:02:15 -0600 From: Bjorn Helgaas To: Johan Hovold Cc: Johan Hovold , Bjorn Helgaas , Bjorn Andersson , Konrad Dybcio , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 04/12] PCI: qcom: Add support for disabling ASPM L0s in devicetree Message-ID: <20240228220215.GA308296@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Feb 27, 2024 at 04:29:15PM +0100, Johan Hovold wrote: > On Fri, Feb 23, 2024 at 04:10:00PM -0600, Bjorn Helgaas wrote: > > On Fri, Feb 23, 2024 at 04:21:16PM +0100, Johan Hovold wrote: > > > Commit 9f4f3dfad8cf ("PCI: qcom: Enable ASPM for platforms supporting > > > 1.9.0 ops") started enabling ASPM unconditionally when the hardware > > > claims to support it. This triggers Correctable Errors for some PCIe > > > devices on machines like the Lenovo ThinkPad X13s, which could indicate > > > an incomplete driver ASPM implementation or that the hardware does in > > > fact not support L0s. > > > > Are there any more details about this? Do the errors occur around > > suspend/resume, a power state transition, or some other event? Might > > other DWC-based devices be susceptible? Is there a specific driver > > you suspect might be incomplete? > > I see these errors when the devices in question are active as well as > idle (not during suspend/resume). For example, when running iperf3 or > fio to test the wifi and nvme, but I also see this occasionally for a > wifi device which is (supposedly) not active (e.g. a handful errors over > night). > > I skimmed Qualcomm's driver and noted that there are some registers > related to ASPM which that driver updates, while the mainline driver > leaves them at their default settings, but I essentially only mentioned > that the ASPM implementation may be incomplete as a theoretical > possibility. The somewhat erratic ASPM behaviour for one of the modems > also suggests that some further tweak/quirk may be needed, and I was > hoping to catch Mani's interest by reporting it. > > But based on what I've since heard from Qualcomm, it seems like these > correctable error may be a known issue with the hardware (e.g. seen > also with Windows), which is also why we decided to disable it for all > controllers on these two platforms where I've seen this in v2. > > > Do you want the DT approach because the problem is believed to be > > platform-specific? Otherwise, maybe we should consider reverting > > 9f4f3dfad8cf until the problem is understood? > > Enabling ASPM gave a very significant improvement in battery life on the > Lenovo ThinkPad X13s, from 10.5 h to 15 h, so reverting is not really an > option there. Ah, I missed that you're only disabling L0s, but leaving L1 enabled, thanks! And given that the v1.9.0 ops that enable ASPM are used on a bunch of platforms, and L0s seems to work fine on most of them, we wouldn't want to disable L0s for everybody, so this seems like the right solution. Bjorn