···7878{7979 int (*error_detected)(struct pci_dev *dev, enum pci_channel_state);8080 int (*mmio_enabled)(struct pci_dev *dev);8181- int (*link_reset)(struct pci_dev *dev);8281 int (*slot_reset)(struct pci_dev *dev);8382 void (*resume)(struct pci_dev *dev);8483};···103104is not implemented, the corresponding feature is considered unsupported.104105For example, if mmio_enabled() and resume() aren't there, then it105106is assumed that the driver is not doing any direct recovery and requires106106-a slot reset. If link_reset() is not implemented, the card is assumed to107107-not care about link resets. Typically a driver will want to know about107107+a slot reset. Typically a driver will want to know about108108a slot_reset().109109110110The actual steps taken by a platform to recover from a PCI error···230232231233STEP 3: Link Reset232234------------------233233-The platform resets the link, and then calls the link_reset() callback234234-on all affected device drivers. This is a PCI-Express specific state235235+The platform resets the link. This is a PCI-Express specific step235236and is done whenever a non-fatal error has been detected that can be236236-"solved" by resetting the link. This call informs the driver of the237237-reset and the driver should check to see if the device appears to be238238-in working condition.239239-240240-The driver is not supposed to restart normal driver I/O operations241241-at this point. It should limit itself to "probing" the device to242242-check its recoverability status. If all is right, then the platform243243-will call resume() once all drivers have ack'd link_reset().244244-245245- Result codes:246246- (identical to STEP 3 (MMIO Enabled)247247-248248-The platform then proceeds to either STEP 4 (Slot Reset) or STEP 5249249-(Resume Operations).250250-251251->>> The current powerpc implementation does not implement this callback.237237+"solved" by resetting the link.252238253239STEP 4: Slot Reset254240------------------
···678678 /* MMIO has been re-enabled, but not DMA */679679 pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev);680680681681- /* PCI Express link has been reset */682682- pci_ers_result_t (*link_reset)(struct pci_dev *dev);683683-684681 /* PCI slot has been reset */685682 pci_ers_result_t (*slot_reset)(struct pci_dev *dev);686683