Re: [PATCH 1/1] PCI/AER: prevent pcie_do_fatal_recovery from using device after it is removed

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

 



On 8/21/2018 11:29 AM, Keith Busch wrote:
Hotplug driver needs to handle both physical removal as well as intermittent
link down issues though.
Back to your patch you linked to earlier, your proposal is to have
pciehp wait for DEVSTS.FED before deciding if it needs to handle the
DLLSC event. That might be a start, but it isn't enough since that
status isn't set if the downstream device reported ERR_FATAL. I think
you'd need to check the secondary status register for a Received System
Error.

Hmm, good feedback.

I was trying not to mix AER/DPC with HP but obviously I failed.
I can add a flag to struct pci_dev like aer_pending for AER.

1. AER ISR sets aer_pending
2. AER ISR issues a secondary bus reset
3. Hotplug driver bails out on aer_pending
4. AER ISR performs the recovery

It is slightly more challenging on the DPC front as HW brings down
the link automatically and hotplug driver can observe the link down
event before the DPC ISR. I'll have to go check if DPC interrupt is
pending.

Let me know if this works out.



[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