From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 331CEC3DA6E for ; Thu, 28 Dec 2023 15:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xElROmD/vDZCbbMG3euhyHhCB4PphWuErmnQkX14vIo=; b=BQGpdxxY6YW6w+ 4yXwQT81VabQcOq/HquuOqzhRct2s1MSlMPnKt7HVn1CdTv4mmE3dz8TYUQtXcc8ryoaqlJgMojql cAE029FnEJXTkr77v94oD4wpOauhlq2InqjBPWam8BJIK7tsU2KJ8ZC4sc6KhKPXWzx7GFA+N5VdW 75kBRKIWPP+stmX5y8dtGK6AnbmBsWl/O0jab3LK/4maRJPNsFlwniKoUYgGhSVpoXZgiOtlEmD6I s+kE6NmyH4kohOmv0T/WGH//ct+SCaAZait1InCFeqsqNcJnFpUHj7Ks1OiNsrlxgmdysAXL6GXKp zbOt2iAdSOn3eLekYVig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rIrtM-00H1qc-0T; Thu, 28 Dec 2023 15:01:48 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rIrtI-00H1qC-2R; Thu, 28 Dec 2023 15:01:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1703775696; bh=f5uBxFja9DMkfap4ZKntPYZpZ4ZCc3Cy9poJ6+NQsxc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xkhfcba5stsYFFBMs8uvuCqj7wU29mNZ9esC/bGRgAABwJ4zVcoYhfdAzJOtf0Hft mDdPr/ePtvE/595TqtvTVl4nj+tg9bpDpoN0O2EcUblUiVf7PLx9EGaxZ9YlJy25WZ Kp5QSGeC1PkiYUXgAlL7fFoZ0+gVFQC2z+LMEY6c+49eQSPATck/uFUGdjOuTS/3/W I5WrwvxAsHJkSCapDLqCN8DuSmYa/D/97DqVihNtloLdt1doP4ZCXN+KStLWaNiHai FBVRO74QUSTfoIQGWzRvH8yr+AI7FpiIyCVAOpEr4u8DzIhx0U/fbBPhZIRhVQz+/N AUaTRHkWTT/KA== Received: from notapiano (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id A87F537813C4; Thu, 28 Dec 2023 15:01:32 +0000 (UTC) Date: Thu, 28 Dec 2023 12:00:59 -0300 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: AngeloGioacchino Del Regno Cc: ryder.lee@mediatek.com, jianjun.wang@mediatek.com, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, p.zabel@pengutronix.de, matthias.bgg@gmail.com, linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] PCI: mediatek-gen3: Assert MAC reset only if PHY reset also present Message-ID: References: <20230504113509.184633-1-angelogioacchino.delregno@collabora.com> <20230504113509.184633-3-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230504113509.184633-3-angelogioacchino.delregno@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231228_070145_014188_93446DFD X-CRM114-Status: GOOD ( 16.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 04, 2023 at 01:35:09PM +0200, AngeloGioacchino Del Regno wrote: > Some SoCs have two PCI-Express controllers: in the case of MT8195, > one of them is using a dedicated PHY, but the other uses a combo PHY > that is shared with USB and in that case the PHY cannot be reset > from the PCIe driver, or USB functionality will be unable to resume. > = > Resetting the PCIe MAC without also resetting the PHY will result in > a full system lockup at PCIe resume time and the only option to > resume operation is to hard reboot the system (with a PMIC cut-off). > = > To resolve this issue, check if we've got both a PHY and a MAC reset > and, if not, never assert resets at PM suspend time: in that case, > the link is still getting powered down as both the clocks and the > power domains will go down anyway. > = > Fixes: d537dc125f07 ("PCI: mediatek-gen3: Add system PM support") > Signed-off-by: AngeloGioacchino Del Regno Hi Angelo, It seems this patch was forgotten but it's still very much needed. As you describe above, the Tomato Chromebook (MT8195-based) is currently unable to resume from suspend due to this issue. Upon resume, the following error is printed, and the system hangs: [ 67.018281] mtk-pcie-gen3 112f8000.pcie: PCIe link down, current LTSSM s= tate: detect.quiet (0x0) [ 67.027162] mtk-pcie-gen3 112f8000.pcie: PM: dpm_run_callback(): genpd_r= esume_noirq+0x0/0x24 returns -110 [ 67.036791] mtk-pcie-gen3 112f8000.pcie: PM: failed to resume noirq: err= or -110 And further investigation showed that all PCIe registers return 0x0 when re= ad in this situation. Commenting out the MAC reset in the PCIe DT node fixes the issue: the PCIe registers can be read correctly upon resume and resume proceeds succesfully. Your patch here essentially does the same as not providing the MAC reset, w= ith the benefit of us still being able to describe the reset in DT and thus hav= ing a more complete HW description. But this patch no longer applies, so please rebase it so we can get working suspend/resume on MT8195-Tomato :). Thanks, N=EDcolas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel