[PATCH 05/31] powerpc/eeh: Trace PCI bus from PE

Gavin Shan shangw at linux.vnet.ibm.com
Wed Jun 19 18:48:52 EST 2013


On Wed, Jun 19, 2013 at 03:21:07PM +0800, Mike Qiu wrote:

.../...

>>+		/*
>>+		 * For PCI bus sensitive PE, we can reset the parent
>>+		 * bridge in order for hot-reset. However, the PCI
>>+		 * devices including the associated EEH devices might
>>+		 * be removed when EEH core is doing recovery. So that
>>+		 * won't safe to retrieve the bridge through downstream
>>+		 * EEH device. We have to trace the parent PCI bus, then
>>+		 * the parent bridge explicitly.
>>+		 */
>>+		if (eeh_probe_mode_dev() && !pe->bus) {
>>+			first_edev = list_first_entry(&pe->edevs,
>>+						      struct eeh_dev, list);
>>+			pe->bus = eeh_dev_to_pci_dev(first_edev)->bus;
>>+		}
>Hi Gavin
>
>I have qestion, can we keep pe->bus for a device pe ? the value is
>the bus which edev belongs to.
>
>so that we can make the code more efficient for device pe.
>
>I have no idea of whether this will cause side effect
>

Thanks, Mike. Good catch actually, it won't have side-effect and
possiblly avoid problems during hot-plug: For PCI bus with only
child PCI device, we won't return the PCI bus (without fix) and
the EEH core doesn't do hot-plug on the affected PCI bus then. 

I'm testing on the updated patch and will send that out soon if it
works well.

Thanks,
Gavin



More information about the Linuxppc-dev mailing list