[PATCH 15/22] ppc64: PCI Error Recovery: PPC64 core recovery routines

Paul Mackerras paulus at samba.org
Wed Oct 12 19:49:52 EST 2005


Linas writes:

> +	/* We might not have a pci device, if it was a config space read
> +	 * that failed.  Find the pci device now.  */
> +	if (!dev) {
> +		while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
> +			if (pci_device_to_OF_node(dev) == event->dn)
> +				break;
> +		}
> +	}

Couldn't we just use PCI_DN(event->dn)->pcidev here?  Is there some
reason why this would not work in some circumstances?  It would be
nice to avoid this linear search.

Paul.



More information about the Linuxppc64-dev mailing list