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 D2B27C3DA4A for ; Tue, 20 Aug 2024 06:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=B0fnzpeczoVILcPKkO8zLBXL0D6BHapuvSYzKwE9Niw=; b=rthewOSsFplDVIvRMcPxz35k/Q EVYTAgyT1rGXuNEQ381M6kVIAupIBk5ubJ1r7ySZY/9MLOcghlPBmGd7WXsKjS1ZQI1y8MnIEgqm8 wNNpDyYm8S8cE1PZHsGhTPHS6ikeao+vxNwUcIcd8Ed48Z+7W0OgnjpkZchjcmwilhV8sLEIpNpkw RYXTkkUaVE4g19Iw8yr/XzSryVS2pOQus5icMSO25emI6RvLkFhrSkSUKSUBJYiTSLPJ8G5/DOUJx WEpgKZCISE0y/UJY5MLENzkXGTqINaT6GojAjs0KuZXpPFAXBQh4cYGkXAhvMRDxpIqRuDspFrsXH lx30a5lw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgIkP-000000045wj-2snp; Tue, 20 Aug 2024 06:53:41 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgIjX-000000045jS-27pw for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 06:52:49 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-52f04b3cb33so1949317e87.0 for ; Mon, 19 Aug 2024 23:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724136765; x=1724741565; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=B0fnzpeczoVILcPKkO8zLBXL0D6BHapuvSYzKwE9Niw=; b=gpH4Ue/K/Pk3TpL+rApDuFkHc4pXzZwLjmqhKnYSmJTKfzq/ozkLF6joRgwKx1o5gq 9nu/VKTRUZzfAaxGxdlwJ3h1OfXh1bw1bZ5pmo5vVyhn7SuCLpoyHskrf0ZA6BheSgbw jJ7VK2E67JK14596A3YDKO8gtUso51VNOefgP/2rKl1JCWNPCwoOcKnFBU7xBuKeO6nU 5J+L5JvqG8rvQs+c8iVZPo/SmRIoreXQXVkKn1R3UhCs8kQ/mw+xZhcO9STMUMKCfprN rgDsJ6aVvKk+B3YBei9hQH+5QIn9GHsJDJ0xKXuhs1OoJc1XRljLCgsE8wCyKxgpeUrz 2jvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724136765; x=1724741565; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=B0fnzpeczoVILcPKkO8zLBXL0D6BHapuvSYzKwE9Niw=; b=e2PDWqORSKrJSIgi6IF8+so0X3b++mDs2uGlUHCkA7Cu0zth3o1BTM0I+yBIEqqTab BS1zMTIzuiWc4wBOgZPjLE7MYQ6AMa9qUuLfIuxsVLS8sCPSwRick9RJVfU1rvkAyTHQ glgitOlNZAT/tiu6LuBtFqLCctunF0OJjl8YGD0D1WacC6t7cJ4/YTWyJRKnKmw8rmky Y7htYU81uYHHEIVBsRSnBKONvNKTb4gKTaIzk7cpuvR1PuWGySkbvNhbqPpPJc3QzBzZ 0aMSned9LbzHFkGL7nEpz20IN1ebgqdfbRObKKqlPgZ8a1XptUEJuU68tDSxrI1bniYv aVUQ== X-Forwarded-Encrypted: i=1; AJvYcCV3M0tJJcQ7terjTUT8U1GycGwit0cwma0V+K78F0hT3qnEUfFiHwgahrLczasWO+pu6t+ETvSkIBdoPlKPCkgP@lists.infradead.org X-Gm-Message-State: AOJu0YyJycEq8XKXB4wOQCw8Na+fatuWyuf84BV3RG6aDIvzimHetrfi VG6gkYLGtk+M3f2QN4aXQcNWpAIGuLc5009/QHMb4vCKUeV/K6Rj X-Google-Smtp-Source: AGHT+IFovNs2nwZnc1lJwCKr78P7Vc8jgqy02le1EmeWWeioP/zLobADP3e48VyNL9RyjxcDN+vlHg== X-Received: by 2002:a05:6512:3da6:b0:52c:e119:7f1 with SMTP id 2adb3069b0e04-5331c6e3b3fmr10786119e87.51.1724136764869; Mon, 19 Aug 2024 23:52:44 -0700 (PDT) Received: from eichest-laptop ([77.109.188.34]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a838394645dsm728973666b.144.2024.08.19.23.52.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 23:52:43 -0700 (PDT) Date: Tue, 20 Aug 2024 08:52:41 +0200 From: Stefan Eichenberger To: Frank Li Cc: hongxing.zhu@nxp.com, l.stach@pengutronix.de, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, francesco.dolcini@toradex.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 0/3] PCI: imx6: reset link after suspend/resume Message-ID: References: <20240819090428.17349-1-eichest@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240819_235247_577199_90C793AB X-CRM114-Status: GOOD ( 31.02 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 19, 2024 at 10:30:38AM -0400, Frank Li wrote: > On Mon, Aug 19, 2024 at 11:03:16AM +0200, Stefan Eichenberger wrote: > > On the i.MX6Quad (not QuadPlus), the PCIe link does not work after a > > suspend/resume cycle. Worse, the PCIe memory mapped I/O isn't accessible > > at all, so the system freezes when a PCIe driver tries to access its I/O > > space. The only way to get resume working again is to reset the PCIe > > link, similar to what is done on devices that support suspend/resume. > > Through trial and error, we found that something about the PCIe > > reference clock does not work as expected after a resume. We could not > > figure out if it is disabled (even though the registers still say it is > > enabled), or if it is somehow unstable or has some hiccups. With the > > workaround introduced in this patch series, we were able to fully resume > > a Compex WLE900VX (ath10k) miniPCIe Wifi module and an Intel AX200 M.2 > > Wifi module. If there is a better way or other ideas on how to fix this > > problem, please let us know. We are aware that resetting the link should > > not be necessary, but we could not find a better solution. More > > interestingly, even the SoCs that support suspend/resume according to > > the i.MX erratas seem to reset the link on resume in > > imx6_pcie_host_init, so we hope this might be a valid workaround. > > > > Stefan Eichenberger (3): > > PCI: imx6: Add a function to deassert the reset gpio > > PCI: imx6: move the wait for clock stabilization to enable ref clk > > PCI: imx6: reset link on resume > > Thanks you for your patch, but it may have conflict with > https://lore.kernel.org/linux-pci/Zr4XG6r+HnbIlu8S@lizhi-Precision-Tower-5810/T/#t > Thanks a lot for the hint. I will have a look at the series and see if I can adapt my changes including your suggestions. Regards, Stefan