All of lore.kernel.org
 help / color / mirror / Atom feed
From: Siddharth Vadapalli <s-vadapalli@ti.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: <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>, Serge Semin <fancer.lancer@gmail.com>,
	<s-vadapalli@ti.com>
Subject: Re: [PATCH v2] PCI: keystone: Fix ks_pcie_v3_65_add_bus() for AM654x SoC
Date: Thu, 19 Oct 2023 10:14:24 +0530	[thread overview]
Message-ID: <6842cdf9-d73b-4895-891f-993eaf5bee6e@ti.com> (raw)
In-Reply-To: <20231018163632.GA1364574@bhelgaas>

Hello Bjorn,

On 18/10/23 22:06, Bjorn Helgaas wrote:
> [+cc Serge (please cc people who have commented on previous revisions)]

Sure, I will do so.

> 
> On Wed, Oct 18, 2023 at 01:20:38PM +0530, Siddharth Vadapalli wrote:

...

>>
>> Changes since v1:
>> - Updated patch subject and commit message.
>> - Determined that issue is not with the absence of Link as mentioned in
>>   v1 patch. Even with Link up and endpoint device connected, if
>>   ks_pcie_v3_65_add_bus() is invoked and executed, all reads to the
>>   MSI-X offsets return 0xffffffff when pcieport driver attempts to setup
>>   AER and PME services. The all Fs return value indicates that the MSI-X
>>   configuration is failing even if Endpoint device is connected. This is
>>   because the ks_pcie_v3_65_add_bus() function is not applicable to the
>>   AM654x SoC which uses DW PCIe IP-core version 4.90a.
> 
> Thanks for verifying that this doesn't actually depend on whether the
> link is up.
> 
> I think that means we should be able to get rid of the
> ks_pcie_v3_65_add_bus() callback altogether and instead do this along
> with the rest of the Root Port init.

Yes, I will follow Serge's suggestion of adding a new pci_ops structure for the
AM654x SoC which uses the new 4.90a controller. I have described it at:
https://lore.kernel.org/r/ba217723-1501-4e72-b143-e0047266ea9a@ti.com/
and am summarizing it below:

I will add the following:
static struct pci_ops ks_pcie_am6_ops = {
	.map_bus = dw_pcie_own_conf_map_bus,
	.read = pci_generic_config_read,
	.write = pci_generic_config_write,
};
which shall be used for AM654x SoC

I will also modify the contents of ks_pcie_host_init() as follows:
if(ks_pcie->is_am6)
	pp->bridge->ops = &ks_pcie_am6_ops;
else
	pp->bridge->ops = &ks_pcie_ops;

which will ensure that the .add_bus() method is no longer applicable to the
AM654x SoC, which was the case prior to commit 6ab15b5e7057.

I shall post the v3 patch with the above changes and also Cc Serge.

-- 
Regards,
Siddharth.

WARNING: multiple messages have this Message-ID (diff)
From: Siddharth Vadapalli <s-vadapalli@ti.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: <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>, Serge Semin <fancer.lancer@gmail.com>,
	<s-vadapalli@ti.com>
Subject: Re: [PATCH v2] PCI: keystone: Fix ks_pcie_v3_65_add_bus() for AM654x SoC
Date: Thu, 19 Oct 2023 10:14:24 +0530	[thread overview]
Message-ID: <6842cdf9-d73b-4895-891f-993eaf5bee6e@ti.com> (raw)
In-Reply-To: <20231018163632.GA1364574@bhelgaas>

Hello Bjorn,

On 18/10/23 22:06, Bjorn Helgaas wrote:
> [+cc Serge (please cc people who have commented on previous revisions)]

Sure, I will do so.

> 
> On Wed, Oct 18, 2023 at 01:20:38PM +0530, Siddharth Vadapalli wrote:

...

>>
>> Changes since v1:
>> - Updated patch subject and commit message.
>> - Determined that issue is not with the absence of Link as mentioned in
>>   v1 patch. Even with Link up and endpoint device connected, if
>>   ks_pcie_v3_65_add_bus() is invoked and executed, all reads to the
>>   MSI-X offsets return 0xffffffff when pcieport driver attempts to setup
>>   AER and PME services. The all Fs return value indicates that the MSI-X
>>   configuration is failing even if Endpoint device is connected. This is
>>   because the ks_pcie_v3_65_add_bus() function is not applicable to the
>>   AM654x SoC which uses DW PCIe IP-core version 4.90a.
> 
> Thanks for verifying that this doesn't actually depend on whether the
> link is up.
> 
> I think that means we should be able to get rid of the
> ks_pcie_v3_65_add_bus() callback altogether and instead do this along
> with the rest of the Root Port init.

Yes, I will follow Serge's suggestion of adding a new pci_ops structure for the
AM654x SoC which uses the new 4.90a controller. I have described it at:
https://lore.kernel.org/r/ba217723-1501-4e72-b143-e0047266ea9a@ti.com/
and am summarizing it below:

I will add the following:
static struct pci_ops ks_pcie_am6_ops = {
	.map_bus = dw_pcie_own_conf_map_bus,
	.read = pci_generic_config_read,
	.write = pci_generic_config_write,
};
which shall be used for AM654x SoC

I will also modify the contents of ks_pcie_host_init() as follows:
if(ks_pcie->is_am6)
	pp->bridge->ops = &ks_pcie_am6_ops;
else
	pp->bridge->ops = &ks_pcie_ops;

which will ensure that the .add_bus() method is no longer applicable to the
AM654x SoC, which was the case prior to commit 6ab15b5e7057.

I shall post the v3 patch with the above changes and also Cc Serge.

-- 
Regards,
Siddharth.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-10-19  4:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18  7:50 [PATCH v2] PCI: keystone: Fix ks_pcie_v3_65_add_bus() for AM654x SoC Siddharth Vadapalli
2023-10-18  7:50 ` Siddharth Vadapalli
2023-10-18  8:19 ` Ravi Gunasekaran
2023-10-18  8:19   ` Ravi Gunasekaran
2023-10-18  8:24   ` Siddharth Vadapalli
2023-10-18  8:24     ` Siddharth Vadapalli
2023-10-18 11:11 ` Serge Semin
2023-10-18 11:11   ` Serge Semin
2023-10-18 11:56   ` Siddharth Vadapalli
2023-10-18 11:56     ` Siddharth Vadapalli
2023-10-18 12:15     ` Serge Semin
2023-10-18 12:15       ` Serge Semin
2023-10-19  4:37       ` Siddharth Vadapalli
2023-10-19  4:37         ` Siddharth Vadapalli
2023-10-19  8:17         ` Siddharth Vadapalli
2023-10-19  8:17           ` Siddharth Vadapalli
2023-10-18 16:36 ` Bjorn Helgaas
2023-10-18 16:36   ` Bjorn Helgaas
2023-10-19  4:44   ` Siddharth Vadapalli [this message]
2023-10-19  4:44     ` Siddharth Vadapalli
2023-10-19  8:22     ` Siddharth Vadapalli
2023-10-19  8:22       ` Siddharth Vadapalli

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=6842cdf9-d73b-4895-891f-993eaf5bee6e@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.