[PATCH 1/13]: PCI Err: pci.h header file changes

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Jun 29 11:43:56 EST 2005


On Tue, 2005-06-28 at 18:58 -0500, Linas Vepstas wrote:
> +
> +/* PCI bus error event callbacks */
> +struct pci_error_handlers
> +{
> +       enum pci_channel_state error_state;       /* current error state */
> +       int (*error_detected)(struct pci_dev *dev, enum pci_channel_state error);
> +       int (*mmio_enabled)(struct pci_dev *dev); /* MMIO has been reanbled, but not DMA */
> +       int (*link_reset)(struct pci_dev *dev);   /* PCI Express link has been reset */
> +       int (*slot_reset)(struct pci_dev *dev);   /* PCI slot has been reset */
> +       void (*resume)(struct pci_dev *dev);      /* Device driver may resume normal operations */
> +};

The state variable shouldn't be in that structure. As Greg pointed, we
should have a pointer to that structure in pci_driver, not a copy, and
the error state should be in pci_dev. (With you current code, it's per
driver which is broken anyway).

Ben.




More information about the Linuxppc64-dev mailing list