aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-02-02 16:35:57 -0500
committerBjorn Helgaas <bhelgaas@google.com>2013-02-02 16:35:57 -0500
commitf2dfcde4ccd101fa3ba8f6c27273a0e359ea9c9c (patch)
tree2920a8164d5243bc4c6a5e0eb006f1256ccecf66 /drivers/pci/pci.c
parentecb87e6609d3a559eacf7a61f5b4e088a797d07c (diff)
parent775c739e0b08fbffb791595a4708460fc978b5b6 (diff)
Merge branch 'pci/misc' into next
* pci/misc: PCI: pciehp: Drop suspend/resume ENTRY messages PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc PCI: Document hpiosize= and hpmemsize= resource reservation parameters PCI: Use PCI Express Capability accessor PCI: Introduce accessor to retrieve PCIe Capabilities Register PCI: Kill pci_is_reassigndev()
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 177a50ff6454..393cf095a0c4 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3748,18 +3748,6 @@ resource_size_t pci_specified_resource_alignment(struct pci_dev *dev)
3748 return align; 3748 return align;
3749} 3749}
3750 3750
3751/**
3752 * pci_is_reassigndev - check if specified PCI is target device to reassign
3753 * @dev: the PCI device to check
3754 *
3755 * RETURNS: non-zero for PCI device is a target device to reassign,
3756 * or zero is not.
3757 */
3758int pci_is_reassigndev(struct pci_dev *dev)
3759{
3760 return (pci_specified_resource_alignment(dev) != 0);
3761}
3762
3763/* 3751/*
3764 * This function disables memory decoding and releases memory resources 3752 * This function disables memory decoding and releases memory resources
3765 * of the device specified by kernel's boot parameter 'pci=resource_alignment='. 3753 * of the device specified by kernel's boot parameter 'pci=resource_alignment='.
@@ -3774,7 +3762,9 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev)
3774 resource_size_t align, size; 3762 resource_size_t align, size;
3775 u16 command; 3763 u16 command;
3776 3764
3777 if (!pci_is_reassigndev(dev)) 3765 /* check if specified PCI is target device to reassign */
3766 align = pci_specified_resource_alignment(dev);
3767 if (!align)
3778 return; 3768 return;
3779 3769
3780 if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL && 3770 if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
@@ -3790,7 +3780,6 @@ void pci_reassigndev_resource_alignment(struct pci_dev *dev)
3790 command &= ~PCI_COMMAND_MEMORY; 3780 command &= ~PCI_COMMAND_MEMORY;
3791 pci_write_config_word(dev, PCI_COMMAND, command); 3781 pci_write_config_word(dev, PCI_COMMAND, command);
3792 3782
3793 align = pci_specified_resource_alignment(dev);
3794 for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) { 3783 for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) {
3795 r = &dev->resource[i]; 3784 r = &dev->resource[i];
3796 if (!(r->flags & IORESOURCE_MEM)) 3785 if (!(r->flags & IORESOURCE_MEM))