Subject: Re: [PATCH v6 0/4] PCI: Add support for resetting the Root Ports in a platform specific way

From: Niklas Cassel <[email-masked]>
Date: Wed, 11 Mar 2026 11:59:37 +0100

On Tue, Mar 10, 2026 at 07:07:39PM +0530, Manivannan Sadhasivam wrote:
> > 
> > I tested your patch series + your suggested change above, and after a:
> > 
> > ## On EP side:
> > # echo 0 > /sys/kernel/config/pci_ep/controllers/a40000000.pcie-ep/start && \
> >   sleep 0.1 && echo 1 > /sys/kernel/config/pci_ep/controllers/a40000000.pcie-ep/start
> > 
> > Instead of:
> > 
> > # FAILED: 1 / 16 tests passed.
> > 
> > I now get:
> > # FAILED: 7 / 16 tests passed.
> > 
> > Test cases 1-7 now passes (the test cases related to BARs),
> > all other test cases still fail:

(snip)

> I guess what is going wrong here is that you might be rebooting the device
> *after* restoring the config space in 'slot_reset()' callback. So all the
> previous config space contents would be lost and the device would've started
> afresh.

I'm confused.

# echo 0 > /sys/kernel/config/pci_ep/controllers/a40000000.pcie-ep/start && \
  sleep 0.1 && echo 1 > /sys/kernel/config/pci_ep/controllers/a40000000.pcie-ep/start

Will not reboot the device.

> 
> I don't think we can restore the config space after rebooting the EP device,
> because host has no idea about it. It can only restore the content after
> recovering the device through platform specific means.

Am I missing something, or why are we talking about rebooting the device?

Kind regards,
Niklas