--- drivers/pci/pci-driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) Index: linux-2.6/drivers/pci/pci-driver.c =================================================================== --- linux-2.6.orig/drivers/pci/pci-driver.c +++ linux-2.6/drivers/pci/pci-driver.c @@ -519,8 +519,17 @@ static void pci_pm_set_unknown_state(str */ static int pci_pm_reenable_device(struct pci_dev *pci_dev) { + u16 cmd; int retval; + /* update enable_cnt according to cmd register */ + pci_read_config_word(pci_dev, PCI_COMMAND, &cmd); + if (!pci_dev->is_busmaster && (cmd & PCI_COMMAND_MASTER)) + pci_dev->is_busmaster = true; + if (!pci_is_enabled(pci_dev) && + (cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY))) + atomic_inc(&pci_dev->enable_cnt); + /* if the device was enabled before suspend, reenable */ retval = pci_reenable_device(pci_dev); /*