From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D78036122 for ; Fri, 8 Mar 2024 05:34:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709876076; cv=none; b=iWKL/4T4iBLq/r0xRKDZ1mQ3YOFR/7W8dN8Cl99NHjboRse7/AROj2lXOnGCKpqToP/i2eiwL3fOX9noxu/FHquhEOpJvuDkidPG+g2N8TL5n6jrXqeph6/e3CBM05y/r+I2HKo3JabA6M69Not2hMnljcBMsSt+ThrlLZ/PUNE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709876076; c=relaxed/simple; bh=gGtIE1GlzpRb/hpJLgPmmPxL9CGVUSEwETlUVk1FdHE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=l70iUH1a6ixLSS43xomQsZVeiRx3egY1GKUt6rSxc2kT8XEGIZucNAPYAtVvjVsEx+npSX0mbv0Jw/Snar4Mv25puUsXOsgG8GGkW363/fLR5hxpm/LatGNzRYNeXj7S4cRc0/m/qlRp5aImA5hvU9+PtADb+XtexIKPLi+U7tA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=q3GX42bP; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="q3GX42bP" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1dca3951ad9so13503805ad.3 for ; Thu, 07 Mar 2024 21:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709876073; x=1710480873; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=qLlyiqWF0upHn9Y3ngiUh0k7hhFX2gsYsEhwvlh6VfE=; b=q3GX42bPh6RLUmwtyUxh8JzjX3TdwCOrAXsz2C2JBw974pRaXievziREUbTgkql+cQ 1M/aQ9IYpz93t7nZRW7FKZgt+itJN6kkfZ773prMPlBe/aNUNahDATv2hW5gdh9L7sbp O95LBw8N45duLtED5MMBQKRK0YD14HXB6goUOD3IiCzQaNzpzSQIh/O3+oPE/OOjX2+K EfhS08fZWNwXsbgnnDwHkz5FBah8N3rQRkUw1PgqN1s8e7xTBVRDvq/utvpgxqT/oB1V T+NSfuMupm2+pzYq7TWeXBVAUeXg4aL15nVWqVh/Qp0o9D4GAYMOHGAsp/mOpH6E5zQ/ 23tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709876073; x=1710480873; h=in-reply-to:content-transfer-encoding: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=qLlyiqWF0upHn9Y3ngiUh0k7hhFX2gsYsEhwvlh6VfE=; b=mUcex4B6kAUmmXp4sZi9E9is/LpB/RTYvuoWJ6VgmfXf9EM3eDI/20He754A2QCFc5 bnoIwyXClhhw37l2yqYvhEGGseumYDak1IlHaeNPg+LCVfrCe7NubjL4rfccwT9OWqrz meKS+Nf8zfmwTaNBMuhuU6kXg3jLHo0B/QPQ7DNdbmrD6fovYtj1KSLd7V/1QZ9lgr9y dSPAe2YStkH5H+TnYmcBdq78izcgbgrYB8F60O/6OBX9JsHrv0fhU/+XfyfHIyUy3yex LXs+SjrSwExriH22Hzf7Ehq2EPAP5xt/x3OJwN6V8joN3eb3ieJnAVABQasqYuDQOmvJ sQ0g== X-Forwarded-Encrypted: i=1; AJvYcCWbYQASefrfrA3TGRF3/xQ3Fbpn0u5W4Awr5zx2omI+LVBKNYQMYLeihfYdSm4BluARgGATC3QhkzorNwh5cfqgMHXi4cevux1FR5tdcQ== X-Gm-Message-State: AOJu0YzXGhEMQSTw3bq1TO7ABcTYNNs0Nd1tottkroPFfMBV4gJntvyl AgbVQKjy1EQ8PL8sae3qmTdXY35eG2tYeAYRwgS/MHtRZpWxTmXgj+Nu5TCjhg== X-Google-Smtp-Source: AGHT+IG89iAmJ8LV9BCChv81LryPxWwamgWvwEd6QxuWM+joRnlgHY+wIW3y+qsIhhLN4Fb6hLrFWg== X-Received: by 2002:a17:903:2d1:b0:1dd:65bc:c056 with SMTP id s17-20020a17090302d100b001dd65bcc056mr1956887plk.40.1709876073327; Thu, 07 Mar 2024 21:34:33 -0800 (PST) Received: from thinkpad ([117.217.178.39]) by smtp.gmail.com with ESMTPSA id z4-20020a170903018400b001dd66e6ec91sm578427plg.140.2024.03.07.21.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 21:34:32 -0800 (PST) Date: Fri, 8 Mar 2024 11:04:17 +0530 From: Manivannan Sadhasivam To: Niklas Cassel Cc: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Kishon Vijay Abraham I , Vidya Sagar , Vignesh Raghavendra , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Minghuan Lian , Mingkai Hu , Roy Zang , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I , Jesper Nilsson , Srikanth Thokala , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@axis.com, Frank Li Subject: Re: [PATCH v9 04/10] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host Message-ID: <20240308053417.GA3789@thinkpad> References: <20240304-pci-dbi-rework-v9-0-29d433d99cda@linaro.org> <20240304-pci-dbi-rework-v9-4-29d433d99cda@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Mar 07, 2024 at 09:31:12PM +0100, Niklas Cassel wrote: > On Mon, Mar 04, 2024 at 02:52:16PM +0530, Manivannan Sadhasivam wrote: > > The DWC glue drivers requiring an active reference clock from the PCIe host > > for initializing their PCIe EP core, set a flag called 'core_init_notifier' > > to let DWC driver know that these drivers need a special attention during > > initialization. In these drivers, access to the hw registers (like DBI) > > before receiving the active refclk from host will result in access failure > > and also could cause a whole system hang. > > > > But the current DWC EP driver doesn't honor the requirements of the drivers > > setting 'core_init_notifier' flag and tries to access the DBI registers > > during dw_pcie_ep_init(). This causes the system hang for glue drivers such > > as Tegra194 and Qcom EP as they depend on refclk from host and have set the > > above mentioned flag. > > > > To workaround this issue, users of the affected platforms have to maintain > > the dependency with the PCIe host by booting the PCIe EP after host boot. > > But this won't provide a good user experience, since PCIe EP is _one_ of > > the features of those platforms and it doesn't make sense to delay the > > whole platform booting due to PCIe requiring active refclk. > > > > So to fix this issue, let's move all the DBI access from > > dw_pcie_ep_init() in the DWC EP driver to the dw_pcie_ep_init_complete() > > API. This API will only be called by the drivers setting > > 'core_init_notifier' flag once refclk is received from host. For the rest > > of the drivers that gets the refclk locally, this API will be called > > within dw_pcie_ep_init(). > > > > Fixes: e966f7390da9 ("PCI: dwc: Refactor core initialization code for EP mode") > > Co-developed-by: Vidya Sagar > > Signed-off-by: Vidya Sagar > > Reviewed-by: Frank Li > > Signed-off-by: Manivannan Sadhasivam > > --- > > I'm not sure if the Fixes tag is stictly correct, since there is > nothing wrong with the commit that the Fixes-tag is referencing. > No. The commit was intented to move all the DBI accesses to dw_pcie_ep_init_complete(), but it left few things like ep_init() callback that could access the DBI registers. One may argue that the none of the drivers at that time were accessing DBI registers in that callback etc... but I used that commit as a fixes tag for the sake of backporting. Otherwise, I don't see how we can easily backport this patch. > What this patch addresses is an additional use-case/feature, > which allows you to start the EP-side before the RC-side. > > However, I'm guessing that you kept the Fixes-tag such that this > patch will get backported. However, this patch is number 4/10 in > the patch series. If this is a strict fix that you want backported, > and it does not depend on any of the previous patches (it doesn't > seem that way), then I think that you should have put it as patch > 1/10 in the series. > Not strictly required. Usually the fixes are added first for the ease of merging as you said, but here I intend to merge this series as it is and it is not fixing anything in the ongoing release. But, if I happen to respin, I may reorder so that this can get merged early in next release cycle (this series is going to miss 6.9 anyway). > Patch ordering aside: > Reviewed-by: Niklas Cassel Thanks! - Mani -- மணிவண்ணன் சதாசிவம் 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 C6C13C54E41 for ; Fri, 8 Mar 2024 05:35:23 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=BCO5UHJ6; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TrZd624FDz3vXt for ; Fri, 8 Mar 2024 16:35:22 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=BCO5UHJ6; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linaro.org (client-ip=2607:f8b0:4864:20::62f; helo=mail-pl1-x62f.google.com; envelope-from=manivannan.sadhasivam@linaro.org; receiver=lists.ozlabs.org) Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TrZcF5m66z2ysD for ; Fri, 8 Mar 2024 16:34:35 +1100 (AEDT) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1dcad814986so13741895ad.0 for ; Thu, 07 Mar 2024 21:34:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709876073; x=1710480873; darn=lists.ozlabs.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=qLlyiqWF0upHn9Y3ngiUh0k7hhFX2gsYsEhwvlh6VfE=; b=BCO5UHJ6rLAVxLrrxLEw+vmNEZ0m9mBO23ZV1LYAAtK5GgsoBY+RAJ7B7ADlLDuZLJ xBXBcogS6VHPfSYCtqdVdyHsXZ7rkPTo0N5H9bj9uVvtdZ6YagT0xjRVggkQ7Jvgobb7 /aSjTtjt0vPiQW3/9aI5Ubgann/deO5xynowH8Dh0EcypY6FkgdL5xM7hePQsv/bZz/S pxX6+1yyywUA3sWGKSiT7wiVrN+4sTAuf1y6l7yISkADcUpwslGcfJJ5Ndf6LOlMmK50 01aOWrOKLjSxy08QOj35j6frbH4Ap0JHOtWy3J0XwrfiP/bFsxHyds1GPOEj0ZDqvQ7e y+kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709876073; x=1710480873; h=in-reply-to:content-transfer-encoding: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=qLlyiqWF0upHn9Y3ngiUh0k7hhFX2gsYsEhwvlh6VfE=; b=EbDugynPAu2Vvu8ibzGyRAUYCWRFKgYTN24zlZ33p9qQEU8+XDEFPke9aEe3y9vdXA lnZRgAiJC+K8NEWROBa89j0ZwKpn/etKmLJYihfo7Hved5IoDtQIbH2eFiCtyvcZNu1T e776R8QvFjMpGeGk/767eOkzi8tc3fEk6Xaq8QFpzNgVTG5BIHi+CyHP3g0PB60qeOMt zxPeCAn5lLU03Nfbr4FnA4567CDfkPfN0nSeaDStHUbQM2cYt7MBrwxpwI+TsyJ+/O58 nULtKvebuWeOEkHxEBf//W9tjlf/qV/e1+wc9n1N3TXMdCIo86ChnhIa3b6V9GbZBmbR 6LUg== X-Forwarded-Encrypted: i=1; AJvYcCW0J1Kkuj8PzKvuKCgbyguUPqWbXKYSHg949fqgIfpaQK873fItU8hH3JyTIpv0NPDWUTqm9Bp7FHRVdUUszCa0SS3G1dz19Ee2Wufyfw== X-Gm-Message-State: AOJu0YxGArStPV3HvxZvYOEoSBXL4nSC9xhtuYHZJKt+28ZyP9Dp6fbX 3vSq0nJGeDtIMmR/E70EzibTVvqgSUUu+8qBsdUJ2jA5U0BaQElFfV8qZBFETA== X-Google-Smtp-Source: AGHT+IG89iAmJ8LV9BCChv81LryPxWwamgWvwEd6QxuWM+joRnlgHY+wIW3y+qsIhhLN4Fb6hLrFWg== X-Received: by 2002:a17:903:2d1:b0:1dd:65bc:c056 with SMTP id s17-20020a17090302d100b001dd65bcc056mr1956887plk.40.1709876073327; Thu, 07 Mar 2024 21:34:33 -0800 (PST) Received: from thinkpad ([117.217.178.39]) by smtp.gmail.com with ESMTPSA id z4-20020a170903018400b001dd66e6ec91sm578427plg.140.2024.03.07.21.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 21:34:32 -0800 (PST) Date: Fri, 8 Mar 2024 11:04:17 +0530 From: Manivannan Sadhasivam To: Niklas Cassel Subject: Re: [PATCH v9 04/10] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host Message-ID: <20240308053417.GA3789@thinkpad> References: <20240304-pci-dbi-rework-v9-0-29d433d99cda@linaro.org> <20240304-pci-dbi-rework-v9-4-29d433d99cda@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Vignesh Raghavendra , Kunihiko Hayashi , linux-pci@vger.kernel.org, Lorenzo Pieralisi , Frank Li , Minghuan Lian , Thierry Reding , Kishon Vijay Abraham I , Fabio Estevam , Marek Vasut , Kishon Vijay Abraham I , Rob Herring , Jesper Nilsson , linux-tegra@vger.kernel.org, linux-arm-kernel@axis.com, Jonathan Hunter , NXP Linux Team , Richard Zhu , Srikanth Thokala , linux-arm-msm@vger.kernel.org, Sascha Hauer , linuxppc-dev@lists.ozlabs.org, Bjorn Helgaas , linux-omap@vger.kernel.org, Mingkai Hu , linux-arm-kernel@ lists.infradead.org, Roy Zang , Jingoo Han , Yoshihiro Shimoda , linux-kernel@vger.kernel.org, Vidya Sagar , linux-renesas-soc@vger.kernel.org, Masami Hiramatsu , Pengutronix Kernel Team , Gustavo Pimentel , Shawn Guo , Lucas Stach Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Thu, Mar 07, 2024 at 09:31:12PM +0100, Niklas Cassel wrote: > On Mon, Mar 04, 2024 at 02:52:16PM +0530, Manivannan Sadhasivam wrote: > > The DWC glue drivers requiring an active reference clock from the PCIe host > > for initializing their PCIe EP core, set a flag called 'core_init_notifier' > > to let DWC driver know that these drivers need a special attention during > > initialization. In these drivers, access to the hw registers (like DBI) > > before receiving the active refclk from host will result in access failure > > and also could cause a whole system hang. > > > > But the current DWC EP driver doesn't honor the requirements of the drivers > > setting 'core_init_notifier' flag and tries to access the DBI registers > > during dw_pcie_ep_init(). This causes the system hang for glue drivers such > > as Tegra194 and Qcom EP as they depend on refclk from host and have set the > > above mentioned flag. > > > > To workaround this issue, users of the affected platforms have to maintain > > the dependency with the PCIe host by booting the PCIe EP after host boot. > > But this won't provide a good user experience, since PCIe EP is _one_ of > > the features of those platforms and it doesn't make sense to delay the > > whole platform booting due to PCIe requiring active refclk. > > > > So to fix this issue, let's move all the DBI access from > > dw_pcie_ep_init() in the DWC EP driver to the dw_pcie_ep_init_complete() > > API. This API will only be called by the drivers setting > > 'core_init_notifier' flag once refclk is received from host. For the rest > > of the drivers that gets the refclk locally, this API will be called > > within dw_pcie_ep_init(). > > > > Fixes: e966f7390da9 ("PCI: dwc: Refactor core initialization code for EP mode") > > Co-developed-by: Vidya Sagar > > Signed-off-by: Vidya Sagar > > Reviewed-by: Frank Li > > Signed-off-by: Manivannan Sadhasivam > > --- > > I'm not sure if the Fixes tag is stictly correct, since there is > nothing wrong with the commit that the Fixes-tag is referencing. > No. The commit was intented to move all the DBI accesses to dw_pcie_ep_init_complete(), but it left few things like ep_init() callback that could access the DBI registers. One may argue that the none of the drivers at that time were accessing DBI registers in that callback etc... but I used that commit as a fixes tag for the sake of backporting. Otherwise, I don't see how we can easily backport this patch. > What this patch addresses is an additional use-case/feature, > which allows you to start the EP-side before the RC-side. > > However, I'm guessing that you kept the Fixes-tag such that this > patch will get backported. However, this patch is number 4/10 in > the patch series. If this is a strict fix that you want backported, > and it does not depend on any of the previous patches (it doesn't > seem that way), then I think that you should have put it as patch > 1/10 in the series. > Not strictly required. Usually the fixes are added first for the ease of merging as you said, but here I intend to merge this series as it is and it is not fixing anything in the ongoing release. But, if I happen to respin, I may reorder so that this can get merged early in next release cycle (this series is going to miss 6.9 anyway). > Patch ordering aside: > Reviewed-by: Niklas Cassel Thanks! - Mani -- மணிவண்ணன் சதாசிவம் 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 BA35EC5475B for ; Fri, 8 Mar 2024 05:34: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: 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=H2nDwImgtqzHdPecmpO08oaKLaZJng9gCeS7Mt3EjXs=; b=xmZFXcUoC5K5fG QynnrpX7LuChnTsLDe9ndyuQgv1xtaW65iWPRZE17zWEj3sDxa65UC1Bn5PSguHvfmIT7lmgcjxbn g1ITou3RhH4EGNxeizmu81T4Pe/vpX5QL3S0eXb9MDHj0Rm8Pp1CwZSwTmldM0wKZ3vZBshmyR5Z9 tpNTYy+VIJhl7Qw9A7u3YO7942akzLAGoHVsgXgo+rOozHJ8/biDwM3WQmAjhJYatl9hZE21tTl4K cYNQTUz62o7H87mGBaN0jgfe6D4hqcLnvI8PeEC3gIP4M3FSYo8UrCa3NQpbhU4iLmjPxSA+W8LG4 xPqHxlqswEM23bozX6hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riSsR-00000007sht-1lo3; Fri, 08 Mar 2024 05:34:39 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riSsO-00000007sg1-3h9A for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2024 05:34:38 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1dc1ff58fe4so12649755ad.1 for ; Thu, 07 Mar 2024 21:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709876073; x=1710480873; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=qLlyiqWF0upHn9Y3ngiUh0k7hhFX2gsYsEhwvlh6VfE=; b=nhOQKdN7AEBWtrqi8eMaMasHAA3sFo4ZOeI0DlY9mNCs4ZiytFJQ8BZp0VQ8ihdIpY EcCs2FK8YJOXeds1OQ6RlsqQCjdqzHmhKwKPrkKSdKwOEQmZmeSHtmz3ComA4hRB/Erj MRpzbplFq27LJGmS1KFrCCIe497FXyz7d/S+E1Efcbmn+5oAMHkbeOjKdPPgV9GF11ra YLHAcypheQUacluHBVN4ki99Vy751FX8iWopCQ9km63JRZmRpjrMCtxyXu4WlFqdA2+1 NdqV5pLabNXJ58o3ysrUTILYxguFkmZHhgr7nNcgKE7kQxN5VnWCcb1ktl0Uyrlb3JAd IWgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709876073; x=1710480873; h=in-reply-to:content-transfer-encoding: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=qLlyiqWF0upHn9Y3ngiUh0k7hhFX2gsYsEhwvlh6VfE=; b=KpqMX20rjDzvPg/kQahPbQcua/s1MHHWpYKmQRyd1+qBmgX/uORZReibIMcC6kbCDY j/nEBmQDCsuyWcFfyhsiujgl17rZG79pWxge4eQJ+++L4SdxSU/qN/i0B+/Awu1EP5j0 wCyO2R8j6fdotR9uFRzdqUMkoHR92pcSBWQ1tZE9XUMc0wRKPW8LZACbQlVq6JNccR0J t2LPheuITBcyoJgZmjBpbpZCSZ6PedIIKFyBb1uIANe70+b971dYDv3yAqlZGBTLTXKC KY3Uen7HkuV2xT+CyPbg2jEHxXfcjRFEefGemPbhzfpCQnFP4M+wqz8sSaj6Pe45L9I9 AMRw== X-Forwarded-Encrypted: i=1; AJvYcCUlddjORk7L5TAFmpFUmW1a31lKJ1DWlkmTsxn+8IY6n/MOx0hBYPjrHuGaF8mKaES4gRK0IOAepIuXo4e72DRHEZtduPXzftgCmAzSjun9qCQYXfA= X-Gm-Message-State: AOJu0YyzOwuSLX4ay+DeqEYqszy2mQwhEnawkAtXdUpR7q6LLoG04kdF SAfQfn2Qhnh9yNckrSQXfowv3JB3yMsr/dfUhvbXgDvV0UzBRKB5dWaEAD2TKA== X-Google-Smtp-Source: AGHT+IG89iAmJ8LV9BCChv81LryPxWwamgWvwEd6QxuWM+joRnlgHY+wIW3y+qsIhhLN4Fb6hLrFWg== X-Received: by 2002:a17:903:2d1:b0:1dd:65bc:c056 with SMTP id s17-20020a17090302d100b001dd65bcc056mr1956887plk.40.1709876073327; Thu, 07 Mar 2024 21:34:33 -0800 (PST) Received: from thinkpad ([117.217.178.39]) by smtp.gmail.com with ESMTPSA id z4-20020a170903018400b001dd66e6ec91sm578427plg.140.2024.03.07.21.34.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 21:34:32 -0800 (PST) Date: Fri, 8 Mar 2024 11:04:17 +0530 From: Manivannan Sadhasivam To: Niklas Cassel Cc: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Kishon Vijay Abraham I , Vidya Sagar , Vignesh Raghavendra , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Minghuan Lian , Mingkai Hu , Roy Zang , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I , Jesper Nilsson , Srikanth Thokala , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@axis.com, Frank Li Subject: Re: [PATCH v9 04/10] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host Message-ID: <20240308053417.GA3789@thinkpad> References: <20240304-pci-dbi-rework-v9-0-29d433d99cda@linaro.org> <20240304-pci-dbi-rework-v9-4-29d433d99cda@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_213437_026135_1F571DC1 X-CRM114-Status: GOOD ( 37.66 ) 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="utf-8" Content-Transfer-Encoding: base64 Sender: "linux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