Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci

One regression fix for SR-IOV on PPC and a couple of misc fixes from
Yinghai.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci:
PCI: Fix pci cardbus removal
PCI: set pci sriov page size before reading SRIOV BAR
PCI: workaround hard-wired bus number V2

+28 -8
+1 -2
drivers/pci/iov.c
··· 347 347 return rc; 348 348 } 349 349 350 - pci_write_config_dword(dev, iov->pos + PCI_SRIOV_SYS_PGSIZE, iov->pgsz); 351 - 352 350 iov->ctrl |= PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE; 353 351 pci_cfg_access_lock(dev); 354 352 pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl); ··· 464 466 return -EIO; 465 467 466 468 pgsz &= ~(pgsz - 1); 469 + pci_write_config_dword(dev, pos + PCI_SRIOV_SYS_PGSIZE, pgsz); 467 470 468 471 nres = 0; 469 472 for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) {
+5
drivers/pci/probe.c
··· 651 651 dev_dbg(&dev->dev, "scanning [bus %02x-%02x] behind bridge, pass %d\n", 652 652 secondary, subordinate, pass); 653 653 654 + if (!primary && (primary != bus->number) && secondary && subordinate) { 655 + dev_warn(&dev->dev, "Primary bus is hard wired to 0\n"); 656 + primary = bus->number; 657 + } 658 + 654 659 /* Check if setup is sensible at all */ 655 660 if (!pass && 656 661 (primary != bus->number || secondary <= bus->number)) {
+22 -6
drivers/pci/remove.c
··· 77 77 } 78 78 EXPORT_SYMBOL(pci_remove_bus); 79 79 80 + static void __pci_remove_behind_bridge(struct pci_dev *dev); 80 81 /** 81 82 * pci_remove_bus_device - remove a PCI device and any children 82 83 * @dev: the device to remove ··· 95 94 if (dev->subordinate) { 96 95 struct pci_bus *b = dev->subordinate; 97 96 98 - pci_remove_behind_bridge(dev); 97 + __pci_remove_behind_bridge(dev); 99 98 pci_remove_bus(b); 100 99 dev->subordinate = NULL; 101 100 } ··· 108 107 __pci_remove_bus_device(dev); 109 108 } 110 109 110 + static void __pci_remove_behind_bridge(struct pci_dev *dev) 111 + { 112 + struct list_head *l, *n; 113 + 114 + if (dev->subordinate) 115 + list_for_each_safe(l, n, &dev->subordinate->devices) 116 + __pci_remove_bus_device(pci_dev_b(l)); 117 + } 118 + 119 + static void pci_stop_behind_bridge(struct pci_dev *dev) 120 + { 121 + struct list_head *l, *n; 122 + 123 + if (dev->subordinate) 124 + list_for_each_safe(l, n, &dev->subordinate->devices) 125 + pci_stop_bus_device(pci_dev_b(l)); 126 + } 127 + 111 128 /** 112 129 * pci_remove_behind_bridge - remove all devices behind a PCI bridge 113 130 * @dev: PCI bridge device ··· 136 117 */ 137 118 void pci_remove_behind_bridge(struct pci_dev *dev) 138 119 { 139 - struct list_head *l, *n; 140 - 141 - if (dev->subordinate) 142 - list_for_each_safe(l, n, &dev->subordinate->devices) 143 - __pci_remove_bus_device(pci_dev_b(l)); 120 + pci_stop_behind_bridge(dev); 121 + __pci_remove_behind_bridge(dev); 144 122 } 145 123 146 124 static void pci_stop_bus_devices(struct pci_bus *bus)