Re: reset_slot() callback not respecting MPS config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2025-05-22 at 18:19 +0200, Niklas Cassel wrote:
[snip]

> 
> I think the solution is to add a call to add a
> pcie_bus_configure_settings()
> call in pcie_do_recovery() / pci_host_recover_slots() /
> pci_host_reset_slot() /
> pcibios_reset_secondary_bus().
> 
> 
> Or possibly a:
>         list_for_each_entry(child, &bus->children, node)
>                 pcie_bus_configure_settings(child);
Hey Niklas,

Thanks for writing this out in detail. Just to add to this, I have
tested your suggestion, and it does work. That's is:

```
@@ -4990,6 +4991,8 @@ void __weak pcibios_reset_secondary_bus(struct
pci_dev *dev)
 		if (ret)
 			pci_err(dev, "failed to reset slot: %d\n",
ret);
 
+		list_for_each_entry(child, &dev->bus->children, node)
+			pcie_bus_configure_settings(child);
 		return;
 	}
 
-- 
```

To clarify, with this patch applied, between a Rock5B EP and Rock5B RC
both CONFIG_PCIE_BUS_PERFORMANCE=y. When the host issues a sysfs
initiated bus reset to the endpoint. Everything works as expected.
Whereas before, DMA from EP to host would not work after the bus reset.

Regards,
Wilfred




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux