diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 8 | ||||
-rw-r--r-- | drivers/pci/pci.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 0b7d23b4ad95..be12fbfcae10 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -994,14 +994,16 @@ void acpiphp_enumerate_slots(struct pci_bus *bus) | |||
994 | 994 | ||
995 | /* | 995 | /* |
996 | * This bridge should have been registered as a hotplug function | 996 | * This bridge should have been registered as a hotplug function |
997 | * under its parent, so the context has to be there. If not, we | 997 | * under its parent, so the context should be there, unless the |
998 | * are in deep goo. | 998 | * parent is going to be handled by pciehp, in which case this |
999 | * bridge is not interesting to us either. | ||
999 | */ | 1000 | */ |
1000 | mutex_lock(&acpiphp_context_lock); | 1001 | mutex_lock(&acpiphp_context_lock); |
1001 | context = acpiphp_get_context(handle); | 1002 | context = acpiphp_get_context(handle); |
1002 | if (WARN_ON(!context)) { | 1003 | if (!context) { |
1003 | mutex_unlock(&acpiphp_context_lock); | 1004 | mutex_unlock(&acpiphp_context_lock); |
1004 | put_device(&bus->dev); | 1005 | put_device(&bus->dev); |
1006 | pci_dev_put(bridge->pci_dev); | ||
1005 | kfree(bridge); | 1007 | kfree(bridge); |
1006 | return; | 1008 | return; |
1007 | } | 1009 | } |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e8ccf6c0f08a..bdd64b1b4817 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1155,8 +1155,14 @@ static void pci_enable_bridge(struct pci_dev *dev) | |||
1155 | 1155 | ||
1156 | pci_enable_bridge(dev->bus->self); | 1156 | pci_enable_bridge(dev->bus->self); |
1157 | 1157 | ||
1158 | if (pci_is_enabled(dev)) | 1158 | if (pci_is_enabled(dev)) { |
1159 | if (!dev->is_busmaster) { | ||
1160 | dev_warn(&dev->dev, "driver skip pci_set_master, fix it!\n"); | ||
1161 | pci_set_master(dev); | ||
1162 | } | ||
1159 | return; | 1163 | return; |
1164 | } | ||
1165 | |||
1160 | retval = pci_enable_device(dev); | 1166 | retval = pci_enable_device(dev); |
1161 | if (retval) | 1167 | if (retval) |
1162 | dev_err(&dev->dev, "Error enabling bridge (%d), continuing\n", | 1168 | dev_err(&dev->dev, "Error enabling bridge (%d), continuing\n", |