Commit da8eb3fe authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'pci/resource'

- Decline requests to resize BARs if platform requires us to preserve
  resource assignments (Ard Biesheuvel)

* pci/resource:
  PCI: Decline to resize resources if boot config must be preserved
parents 215fc27d 729e3a66
......@@ -410,10 +410,16 @@ EXPORT_SYMBOL(pci_release_resource);
int pci_resize_resource(struct pci_dev *dev, int resno, int size)
{
struct resource *res = dev->resource + resno;
struct pci_host_bridge *host;
int old, ret;
u32 sizes;
u16 cmd;
/* Check if we must preserve the firmware's resource assignment */
host = pci_find_host_bridge(dev->bus);
if (host->preserve_config)
return -ENOTSUPP;
/* Make sure the resource isn't assigned before resizing it. */
if (!(res->flags & IORESOURCE_UNSET))
return -EBUSY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment