[PATCH v2 1/2] PCI: keystone: Set mode as RootComplex for "ti,keystone-pcie" compatible
Siddharth Vadapalli
s-vadapalli at ti.com
Wed Nov 6 20:39:54 PST 2024
On Thu, Nov 07, 2024 at 01:05:20AM +0900, Krzysztof Wilczyński wrote:
Hello Krzysztof,
> Hello,
>
> [...]
> > > I suppose that "data->mode" will default to zero for v3.65a prior to
> > > this commit, corresponding to "DW_PCIE_UNKNOWN_TYPE" rather than the
> > > correct value of "DW_PCIE_RC_TYPE". Since I don't have an SoC with the
> > > v3.65a version of the controller, I cannot test it out, but I presume
> > > that the "INVALID device type 0" error will be displayed. Though the probe
> > > will not fail since the "default" case doesn't return an error code, the
> > > controller probably will not be functional as the configuration associated
> > > with the "DW_PCIE_RC_TYPE" case has been skipped. Hence, I believe that
> > > this fix should be backported.
> >
> > I guess nobody really cares too much since it's been broken for almost
> > four years.
> >
> > But indeed, sounds like it should have a stable tag and maybe a commit
> > log hint about what the failure looks like.
>
> Added Cc for stable releases. Siddharth, let me know how to update the
> commit log per Bjorn feedback, so I can do it directly on the branch.
The existing commit message could be replaced by the following:
------------------------------------------------------------------------
commit 23284ad677a9 ("PCI: keystone: Add support for PCIe EP in AM654x
Platforms") introduced configuring "enum dw_pcie_device_mode" as part of
device data ("struct ks_pcie_of_data"). However it failed to set the mode
for "ti,keystone-pcie" compatible.
Since the mode defaults to "DW_PCIE_UNKNOWN_TYPE", the following error
message is displayed:
"INVALID device type 0"
for the v3.65a controller. Despite the driver probing successfully, the
controller may not be functional in the Root Complex mode of operation.
So, set the mode as Root Complex for "ti,keystone-pcie" compatible to fix
this.
------------------------------------------------------------------------
Regards,
Siddharth.
More information about the linux-arm-kernel
mailing list