On Fri, Mar 07, 2025 at 10:44:10PM +0800, Chen Wang wrote: > > On 2025/3/7 21:47, Siddharth Vadapalli wrote: > > On Fri, Mar 07, 2025 at 09:07:35PM +0800, Chen Wang wrote: > > > Hello~ > > > > > > Any comment on this? Or can we have this bugfix patch picked for coming > > > v6.15? > > Is there a driver in Linux which is affected by the issue that you are > > trying to fix in this patch? Please point to the driver since I don't > > see such a driver. > > > > Regards, > > Siddharth. > > Oh, sorry I didn't explain the change history clearly. I am developing a > PCIe driver for a new soc (SG2042), and this PCIe controller uses cadence's > IP. In the code, I found that if I don't assign a value to cdns_pcie.ops, it > will crash during operation. At first, I didn't fix the bug in the cadence > code, but used a workaround in the SG2042 driver. Later in the code review, > Manivannan pointed out my problem and hoped that I would submit a patch to > fix this problem in the cadence driver. > > Adding Manivannan who should know about this. > > Please take a look at this: https://lore.kernel.org/linux-riscv/20250119122353.v3tzitthmu5tu3dg@thinkpad/. > For your convenience, I have excerpted some of the text below. > > ``` > > > +static struct pci_ops sg2042_pcie_host_ops = { > > + .map_bus = cdns_pci_map_bus, > > + .read = sg2042_pcie_config_read, > > + .write = sg2042_pcie_config_write, > > +}; > > + > > +/* Dummy ops which will be assigned to cdns_pcie.ops, which must be > !NULL. */ > > Because cadence code driver doesn't check for !ops? Please fix it instead. > And > the fix is trivial. Thank you for providing the context for this patch. Maybe the context should go into the commit message, but that's not a reason to block this patch, so: Reviewed-by: Siddharth Vadapalli <s-vadapalli@xxxxxx> Regards, Siddharth.