• Arjan van de Ven's avatar
    [PATCH] PCI: restore pci config space on resume · db09cd90
    Arjan van de Ven authored
    The patch below enhances the PCI layer with 2 things
    1) enable and busmaster state are stored in the pci device struct
    2) pci config space is stored to the pci device struct
    
    with that, it is possible to make a generic pci resume method that restores
    config space and reenables the device, including busmaster when appropriate.
    
    One can rightfully argue that the driver resume method should do this, and
    yes that is right. So the patch only does it for devices that don't have a
    resume method. Like the main PCI bridge on my testbox of which the bios so
    nicely forgets to restore the bus master bit during resume.. With this patch
    my testbox resumes just fine while it, well, wasn't all too happy as you can
    imagine without a busmaster pci bridge.
    db09cd90
pci-driver.c 13.5 KB