mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Siddharth Vadapalli <s-vadapalli@ti.com>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>, <lpieralisi@kernel.org>,
	<robh@kernel.org>, <kw@linux.com>, <bhelgaas@google.com>,
	<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <r-gunasekaran@ti.com>,
	<srk@ti.com>, <s-vadapalli@ti.com>
Subject: Re: [PATCH] PCI: keystone: Don't enable BAR0 if link is not detected
Date: Wed, 18 Oct 2023 16:19:40 +0530	[thread overview]
Message-ID: <025ec85f-78be-4b0f-9c5b-f59087610c67@ti.com> (raw)
In-Reply-To: <tlx5ysa4jnqzmhq5dpk5yk6uuddpwl5h2ieg6n2h3ozksqyx44@yx5mhvwg5miv>



On 18/10/23 16:12, Serge Semin wrote:
> On Tue, Oct 17, 2023 at 09:44:51AM +0530, Siddharth Vadapalli wrote:
>> Hello,
>>
>> On 17/10/23 02:59, Serge Semin wrote:
>>> Hi Siddharth
>>>
>>
>> ...
>>

...

> 
> Are you really sure that it's 4.90a? Here is what my DW PCIe RC
> _v4.90_ HW databook says about the BARs:
> 
> "Base Address Registers (Offset: 0x10-x14) The Synopsys core does not
> implement the optional BARs for the RC product. This is based on the
> assumption that the RC host probably has registers on some other
> internal bus and has knowledge and setup access to these registers
> already."
> 
> What you cited resides in the _v5.x_ databooks. It makes my thinking
> that in your case the IP-core isn't of 4.90a version.

I reviewed the function ks_pcie_v3_65_add_bus() and it appears clear to me now
that it is applicable only to 3.65a versions. The IP-core however is 4.90a. I
have posted the v2 patch at:
https://lore.kernel.org/r/20231018075038.2740534-1-s-vadapalli@ti.com/

Also, as pointed out by Ravi on the v2 patch's thread at:
https://lore.kernel.org/r/c546f8e9-f6ba-41b8-7dff-4a7921b6705f@ti.com/
the culprit turned out to be:
6ab15b5e7057 (PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus)
which in the process of converting the .scan_bus() callback to .add_bus(), namely:
ks_pcie_v3_65_scan_bus() -> ks_pcie_v3_65_add_bus()
It added the .add_bus() method within "struct pci_ops ks_pcie_ops" which is
actually shared with the 4.90a controller as well. So an "is_am6" check should
have also been added to make it no-op for NON-3.65a controllers.

I will be posting the v3 patch implementing the above fix if there is no further
feedback on the v2 patch from others.

-- 
Regards,
Siddharth.

      reply	other threads:[~2023-10-18 10:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 12:34 Siddharth Vadapalli
2023-10-11 13:46 ` Bjorn Helgaas
2023-10-12  4:45   ` Siddharth Vadapalli
2023-10-12 16:43     ` Bjorn Helgaas
2023-10-13  5:03       ` Siddharth Vadapalli
2023-10-13  5:06         ` Siddharth Vadapalli
2023-10-13 18:49           ` Bjorn Helgaas
2023-10-14  5:52             ` Siddharth Vadapalli
2023-10-16 21:29               ` Serge Semin
2023-10-17  4:14                 ` Siddharth Vadapalli
2023-10-18 10:42                   ` Serge Semin
2023-10-18 10:49                     ` Siddharth Vadapalli [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=025ec85f-78be-4b0f-9c5b-f59087610c67@ti.com \
    --to=s-vadapalli@ti.com \
    --cc=bhelgaas@google.com \
    --cc=fancer.lancer@gmail.com \
    --cc=helgaas@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=r-gunasekaran@ti.com \
    --cc=robh@kernel.org \
    --cc=srk@ti.com \
    /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

all inboxes | Powered by JetHome®