[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y07bgNd7KbLDttsq@google.com>
Date: Tue, 18 Oct 2022 09:59:44 -0700
From: Brian Norris <briannorris@...omium.org>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Ulf Hansson <ulf.hansson@...aro.org>,
Shawn Lin <shawn.lin@...k-chips.com>,
Shawn Guo <shawnguo@...nel.org>,
Fabio Estevam <festevam@...il.com>,
Faiz Abbas <faiz_abbas@...com>,
NXP Linux Team <linux-imx@....com>,
Haibo Chen <haibo.chen@....com>,
Al Cooper <alcooperx@...il.com>, linux-mmc@...r.kernel.org,
Pengutronix Kernel Team <kernel@...gutronix.de>,
linux-kernel@...r.kernel.org,
Florian Fainelli <f.fainelli@...il.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Thierry Reding <thierry.reding@...il.com>,
Michal Simek <michal.simek@...inx.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Sowjanya Komatineni <skomatineni@...dia.com>,
linux-arm-kernel@...ts.infradead.org,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>, stable@...r.kernel.org
Subject: Re: [PATCH 1/5] mmc: sdhci-of-arasan: Fix SDHCI_RESET_ALL for CQHCI
Hi Adrian,
On Tue, Oct 18, 2022 at 07:13:28PM +0300, Adrian Hunter wrote:
> On 18/10/22 06:57, Brian Norris wrote:
> > So like these other patches, deactivate CQHCI when resetting the
> > controller. Also, move around the DT/caps handling, because
> > sdhci_setup_host() performs resets before we've initialized CQHCI. This
> > is the pattern followed in other SDHCI/CQHCI drivers.
>
> Did you consider just checking host->mmc->cqe_private like
> sdhci_cqhci_reset() ?
I did not, although I am doing so now.
My first thought is that this feels a bit too private. Is the host
driver supposed to be memorizing the details of the CQHCI layer?
But on the plus side, that would remove some contortions needed here
(and also in sdhci-brcmstb.c).
Here's another option I previously considered: teaching
cqhci_deactivate() to check cqe_private itself. That would have the same
benefits, while keeping the private details in cqhci-core.c. How do you
like that?
(Tiny downside: cqhci-core.c got its rename in v5.12, so backporting
this to -stable would get slightly more difficult.)
Brian
Powered by blists - more mailing lists