Skip to content

Commit

Permalink
Merge tag 'pci-v4.1-fixes-2' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
 "Resource management
   - Fix IOV sorting by alignment (Wei Yang)
   - Preserve resource size during alignment reordering (Yinghai Lu)

  Miscellaneous
    - MAINTAINERS: Add Pratyush for SPEAr13xx and DesignWare PCIe (Pratyush Anand)"

* tag 'pci-v4.1-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: Preserve resource size during alignment reordering
  PCI: Fix IOV resource sorting by alignment requirement
  MAINTAINERS: Add Pratyush Anand as SPEAr13xx and DesignWare PCIe maintainer
  • Loading branch information
torvalds committed Jun 5, 2015
2 parents 6e6f9e0 + 552bc94 commit 456fdb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7575,6 +7575,7 @@ F: drivers/pci/host/pci-exynos.c

PCI DRIVER FOR SYNOPSIS DESIGNWARE
M: Jingoo Han <[email protected]>
M: Pratyush Anand <[email protected]>
L: [email protected]
S: Maintained
F: drivers/pci/host/*designware*
Expand All @@ -7588,8 +7589,9 @@ F: Documentation/devicetree/bindings/pci/host-generic-pci.txt
F: drivers/pci/host/pci-host-generic.c

PCIE DRIVER FOR ST SPEAR13XX
M: Pratyush Anand <[email protected]>
L: [email protected]
S: Orphan
S: Maintained
F: drivers/pci/host/*spear*

PCMCIA SUBSYSTEM
Expand Down
9 changes: 6 additions & 3 deletions drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,16 +428,19 @@ static void __assign_resources_sorted(struct list_head *head,
* consistent.
*/
if (add_align > dev_res->res->start) {
resource_size_t r_size = resource_size(dev_res->res);

dev_res->res->start = add_align;
dev_res->res->end = add_align +
resource_size(dev_res->res);
dev_res->res->end = add_align + r_size - 1;

list_for_each_entry(dev_res2, head, list) {
align = pci_resource_alignment(dev_res2->dev,
dev_res2->res);
if (add_align > align)
if (add_align > align) {
list_move_tail(&dev_res->list,
&dev_res2->list);
break;
}
}
}

Expand Down

0 comments on commit 456fdb2

Please sign in to comment.