diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-09 15:35:53 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-09 15:35:53 -0500 |
commit | 263a5c8e16c34199ddf6de3f102e789ffa3ee26e (patch) | |
tree | 4f049e339d522b2ab0ba3bed3ec217e4bbc83d35 /drivers/pci | |
parent | 54d20f006ceff1f2f1e69d0e54049b6c0765c039 (diff) | |
parent | 192cfd58774b4d17b2fe8bdc77d89c2ef4e0591d (diff) |
Merge 3.3-rc6 into driver-core-next
This was done to resolve a conflict in the drivers/base/cpu.c file.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/iov.c | 3 | ||||
-rw-r--r-- | drivers/pci/probe.c | 5 | ||||
-rw-r--r-- | drivers/pci/remove.c | 28 | ||||
-rw-r--r-- | drivers/pci/xen-pcifront.c | 10 |
4 files changed, 33 insertions, 13 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 0321fa3b4226..0dab5ecf61bb 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -347,8 +347,6 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn) | |||
347 | return rc; | 347 | return rc; |
348 | } | 348 | } |
349 | 349 | ||
350 | pci_write_config_dword(dev, iov->pos + PCI_SRIOV_SYS_PGSIZE, iov->pgsz); | ||
351 | |||
352 | iov->ctrl |= PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE; | 350 | iov->ctrl |= PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE; |
353 | pci_cfg_access_lock(dev); | 351 | pci_cfg_access_lock(dev); |
354 | pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl); | 352 | pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl); |
@@ -466,6 +464,7 @@ found: | |||
466 | return -EIO; | 464 | return -EIO; |
467 | 465 | ||
468 | pgsz &= ~(pgsz - 1); | 466 | pgsz &= ~(pgsz - 1); |
467 | pci_write_config_dword(dev, pos + PCI_SRIOV_SYS_PGSIZE, pgsz); | ||
469 | 468 | ||
470 | nres = 0; | 469 | nres = 0; |
471 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { | 470 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 7cc9e2f0f47c..71eac9cd724d 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -651,6 +651,11 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
651 | dev_dbg(&dev->dev, "scanning [bus %02x-%02x] behind bridge, pass %d\n", | 651 | dev_dbg(&dev->dev, "scanning [bus %02x-%02x] behind bridge, pass %d\n", |
652 | secondary, subordinate, pass); | 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 | /* Check if setup is sensible at all */ | 659 | /* Check if setup is sensible at all */ |
655 | if (!pass && | 660 | if (!pass && |
656 | (primary != bus->number || secondary <= bus->number)) { | 661 | (primary != bus->number || secondary <= bus->number)) { |
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index 6def3624c688..ef8b18c48f26 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c | |||
@@ -77,6 +77,7 @@ void pci_remove_bus(struct pci_bus *pci_bus) | |||
77 | } | 77 | } |
78 | EXPORT_SYMBOL(pci_remove_bus); | 78 | EXPORT_SYMBOL(pci_remove_bus); |
79 | 79 | ||
80 | static void __pci_remove_behind_bridge(struct pci_dev *dev); | ||
80 | /** | 81 | /** |
81 | * pci_remove_bus_device - remove a PCI device and any children | 82 | * pci_remove_bus_device - remove a PCI device and any children |
82 | * @dev: the device to remove | 83 | * @dev: the device to remove |
@@ -94,7 +95,7 @@ static void __pci_remove_bus_device(struct pci_dev *dev) | |||
94 | if (dev->subordinate) { | 95 | if (dev->subordinate) { |
95 | struct pci_bus *b = dev->subordinate; | 96 | struct pci_bus *b = dev->subordinate; |
96 | 97 | ||
97 | pci_remove_behind_bridge(dev); | 98 | __pci_remove_behind_bridge(dev); |
98 | pci_remove_bus(b); | 99 | pci_remove_bus(b); |
99 | dev->subordinate = NULL; | 100 | dev->subordinate = NULL; |
100 | } | 101 | } |
@@ -107,6 +108,24 @@ void pci_remove_bus_device(struct pci_dev *dev) | |||
107 | __pci_remove_bus_device(dev); | 108 | __pci_remove_bus_device(dev); |
108 | } | 109 | } |
109 | 110 | ||
111 | static void __pci_remove_behind_bridge(struct pci_dev *dev) | ||
112 | { | ||
113 | struct list_head *l, *n; | ||
114 | |||
115 | if (dev->subordinate) | ||
116 | list_for_each_safe(l, n, &dev->subordinate->devices) | ||
117 | __pci_remove_bus_device(pci_dev_b(l)); | ||
118 | } | ||
119 | |||
120 | static void pci_stop_behind_bridge(struct pci_dev *dev) | ||
121 | { | ||
122 | struct list_head *l, *n; | ||
123 | |||
124 | if (dev->subordinate) | ||
125 | list_for_each_safe(l, n, &dev->subordinate->devices) | ||
126 | pci_stop_bus_device(pci_dev_b(l)); | ||
127 | } | ||
128 | |||
110 | /** | 129 | /** |
111 | * pci_remove_behind_bridge - remove all devices behind a PCI bridge | 130 | * pci_remove_behind_bridge - remove all devices behind a PCI bridge |
112 | * @dev: PCI bridge device | 131 | * @dev: PCI bridge device |
@@ -117,11 +136,8 @@ void pci_remove_bus_device(struct pci_dev *dev) | |||
117 | */ | 136 | */ |
118 | void pci_remove_behind_bridge(struct pci_dev *dev) | 137 | void pci_remove_behind_bridge(struct pci_dev *dev) |
119 | { | 138 | { |
120 | struct list_head *l, *n; | 139 | pci_stop_behind_bridge(dev); |
121 | 140 | __pci_remove_behind_bridge(dev); | |
122 | if (dev->subordinate) | ||
123 | list_for_each_safe(l, n, &dev->subordinate->devices) | ||
124 | __pci_remove_bus_device(pci_dev_b(l)); | ||
125 | } | 141 | } |
126 | 142 | ||
127 | static void pci_stop_bus_devices(struct pci_bus *bus) | 143 | static void pci_stop_bus_devices(struct pci_bus *bus) |
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 98387caf59b3..401090110922 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c | |||
@@ -189,7 +189,7 @@ static int pcifront_bus_read(struct pci_bus *bus, unsigned int devfn, | |||
189 | 189 | ||
190 | if (verbose_request) | 190 | if (verbose_request) |
191 | dev_info(&pdev->xdev->dev, | 191 | dev_info(&pdev->xdev->dev, |
192 | "read dev=%04x:%02x:%02x.%01x - offset %x size %d\n", | 192 | "read dev=%04x:%02x:%02x.%d - offset %x size %d\n", |
193 | pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), | 193 | pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), |
194 | PCI_FUNC(devfn), where, size); | 194 | PCI_FUNC(devfn), where, size); |
195 | 195 | ||
@@ -228,7 +228,7 @@ static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn, | |||
228 | 228 | ||
229 | if (verbose_request) | 229 | if (verbose_request) |
230 | dev_info(&pdev->xdev->dev, | 230 | dev_info(&pdev->xdev->dev, |
231 | "write dev=%04x:%02x:%02x.%01x - " | 231 | "write dev=%04x:%02x:%02x.%d - " |
232 | "offset %x size %d val %x\n", | 232 | "offset %x size %d val %x\n", |
233 | pci_domain_nr(bus), bus->number, | 233 | pci_domain_nr(bus), bus->number, |
234 | PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); | 234 | PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); |
@@ -432,7 +432,7 @@ static int __devinit pcifront_scan_bus(struct pcifront_device *pdev, | |||
432 | d = pci_scan_single_device(b, devfn); | 432 | d = pci_scan_single_device(b, devfn); |
433 | if (d) | 433 | if (d) |
434 | dev_info(&pdev->xdev->dev, "New device on " | 434 | dev_info(&pdev->xdev->dev, "New device on " |
435 | "%04x:%02x:%02x.%02x found.\n", domain, bus, | 435 | "%04x:%02x:%02x.%d found.\n", domain, bus, |
436 | PCI_SLOT(devfn), PCI_FUNC(devfn)); | 436 | PCI_SLOT(devfn), PCI_FUNC(devfn)); |
437 | } | 437 | } |
438 | 438 | ||
@@ -1040,7 +1040,7 @@ static int pcifront_detach_devices(struct pcifront_device *pdev) | |||
1040 | pci_dev = pci_get_slot(pci_bus, PCI_DEVFN(slot, func)); | 1040 | pci_dev = pci_get_slot(pci_bus, PCI_DEVFN(slot, func)); |
1041 | if (!pci_dev) { | 1041 | if (!pci_dev) { |
1042 | dev_dbg(&pdev->xdev->dev, | 1042 | dev_dbg(&pdev->xdev->dev, |
1043 | "Cannot get PCI device %04x:%02x:%02x.%02x\n", | 1043 | "Cannot get PCI device %04x:%02x:%02x.%d\n", |
1044 | domain, bus, slot, func); | 1044 | domain, bus, slot, func); |
1045 | continue; | 1045 | continue; |
1046 | } | 1046 | } |
@@ -1048,7 +1048,7 @@ static int pcifront_detach_devices(struct pcifront_device *pdev) | |||
1048 | pci_dev_put(pci_dev); | 1048 | pci_dev_put(pci_dev); |
1049 | 1049 | ||
1050 | dev_dbg(&pdev->xdev->dev, | 1050 | dev_dbg(&pdev->xdev->dev, |
1051 | "PCI device %04x:%02x:%02x.%02x removed.\n", | 1051 | "PCI device %04x:%02x:%02x.%d removed.\n", |
1052 | domain, bus, slot, func); | 1052 | domain, bus, slot, func); |
1053 | } | 1053 | } |
1054 | 1054 | ||