aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-03-02 20:44:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-03-02 20:44:39 -0500
commit329ad5e5445955b9de3438061303fdfbd03173de (patch)
tree65c5f3aa76eb93588ac1e826a22e3136ddb8784a
parent5fbdefcf685defd8bc5a8f37b17538d25c58d77a (diff)
parentc37406e05d1e541df40b8b81c4bd40753fcaf414 (diff)
Merge tag 'pci-v4.16-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI fixes from Bjorn Helgaas: - Update pci.ids location (documentation only) (Randy Dunlap) - Fix a crash when BIOS didn't assign a BAR and we try to enlarge it (Christian König) * tag 'pci-v4.16-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Allow release of resources that were never assigned PCI: Update location of pci.ids file
-rw-r--r--Documentation/PCI/pci.txt4
-rw-r--r--drivers/pci/setup-res.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt
index 611a75e4366e..badb26ac33dc 100644
--- a/Documentation/PCI/pci.txt
+++ b/Documentation/PCI/pci.txt
@@ -570,7 +570,9 @@ your driver if they're helpful, or just use plain hex constants.
570The device IDs are arbitrary hex numbers (vendor controlled) and normally used 570The device IDs are arbitrary hex numbers (vendor controlled) and normally used
571only in a single location, the pci_device_id table. 571only in a single location, the pci_device_id table.
572 572
573Please DO submit new vendor/device IDs to http://pciids.sourceforge.net/. 573Please DO submit new vendor/device IDs to http://pci-ids.ucw.cz/.
574There are mirrors of the pci.ids file at http://pciids.sourceforge.net/
575and https://github.com/pciutils/pciids.
574 576
575 577
576 578
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 369d48d6c6f1..365447240d95 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -401,6 +401,10 @@ void pci_release_resource(struct pci_dev *dev, int resno)
401 struct resource *res = dev->resource + resno; 401 struct resource *res = dev->resource + resno;
402 402
403 pci_info(dev, "BAR %d: releasing %pR\n", resno, res); 403 pci_info(dev, "BAR %d: releasing %pR\n", resno, res);
404
405 if (!res->parent)
406 return;
407
404 release_resource(res); 408 release_resource(res);
405 res->end = resource_size(res) - 1; 409 res->end = resource_size(res) - 1;
406 res->start = 0; 410 res->start = 0;