From: Niklas Cassel <cassel@kernel.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Jingoo Han" <jingoohan1@gmail.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Damien Le Moal" <dlemoal@kernel.org>,
"Frank Li" <Frank.Li@nxp.com>,
"Jesper Nilsson" <jesper.nilsson@axis.com>,
stable@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v5 1/6] PCI: dwc: ep: iATU registers must be written after the BAR_MASK
Date: Fri, 13 Dec 2024 15:38:56 +0100 [thread overview]
Message-ID: <Z1xHAOSiNssDBz3N@ryzen> (raw)
In-Reply-To: <Z1w364da43KCOIGY@ryzen>
Hello Bjorn,
On Fri, Dec 13, 2024 at 02:34:35PM +0100, Niklas Cassel wrote:
> >
> > And I guess the problem is that the previous code does:
> >
> > dw_pcie_ep_inbound_atu # iATU
> > dw_pcie_ep_writel_dbi2 # BAR_MASK (?)
> > dw_pcie_ep_writel_dbi
> >
> > and the new code basically does this:
> >
> > if (ep->epf_bar[bar]) {
> > dw_pcie_ep_writel_dbi2 # BAR_MASK (?)
> > dw_pcie_ep_writel_dbi
> > }
> > dw_pcie_ep_inbound_atu # iATU
> > ep->epf_bar[bar] = epf_bar
> >
> > so the first time we call dw_pcie_ep_set_bar(), we write BAR_MASK
> > before iATU, and if we call dw_pcie_ep_set_bar() again, we skip the
> > BAR_MASK update?
>
> The problem is as described in the commit message:
> "If we do not write the BAR_MASK before writing the iATU registers, we are
> relying the reset value of the BAR_MASK being larger than the requested
> size of the first set_bar() call. The reset value of the BAR_MASK is SoC
> dependent."
Re-reading this commit message, I can see that it is a bit confusing.
I re-wrote the commit messages for patch 1/2 and patch 2/6 in this series,
based on your feedback. (I also updated the code comment in patch 2/6.)
I hope that it slightly clearer now :)
Please review:
https://lore.kernel.org/linux-pci/20241213143301.4158431-8-cassel@kernel.org/T/#u
Kind regards,
Niklas
prev parent reply other threads:[~2024-12-13 14:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20241127103016.3481128-8-cassel@kernel.org>
2024-11-27 10:30 ` [PATCH v5 1/6] PCI: dwc: ep: iATU registers must be written after the BAR_MASK Niklas Cassel
2024-11-30 8:23 ` Manivannan Sadhasivam
2024-12-04 17:33 ` Bjorn Helgaas
2024-12-13 13:34 ` Niklas Cassel
2024-12-13 14:38 ` Niklas Cassel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z1xHAOSiNssDBz3N@ryzen \
--to=cassel@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=bhelgaas@google.com \
--cc=dlemoal@kernel.org \
--cc=helgaas@kernel.org \
--cc=jesper.nilsson@axis.com \
--cc=jingoohan1@gmail.com \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=robh@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox