aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 21:58:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 21:58:52 -0400
commit6109e2ce2600e2db26cd0424bb9c6ed019723288 (patch)
tree54b5d347bf12e0a987edfb52f287399f748a9a38 /drivers/pci/hotplug
parent0961d6581c870850342ad6ea25263763433d666f (diff)
parentac81860ea073daed50246af54db706c6e491f240 (diff)
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (36 commits) PCI: hotplug: pciehp: Removed check for hotplug of display devices PCI: read memory ranges out of Broadcom CNB20LE host bridge PCI: Allow manual resource allocation for PCI hotplug bridges x86/PCI: make ACPI MCFG reserved error messages ACPI specific PCI hotplug: Use kmemdup PM/PCI: Update PCI power management documentation PCI: output FW warning in pci_read/write_vpd PCI: fix typos pci_device_dis/enable to pci_dis/enable_device in comments PCI quirks: disable msi on AMD rs4xx internal gfx bridges PCI: Disable MSI for MCP55 on P5N32-E SLI x86/PCI: irq and pci_ids patch for additional Intel Cougar Point DeviceIDs PCI: aerdrv: trivial cleanup for aerdrv_core.c PCI: aerdrv: trivial cleanup for aerdrv.c PCI: aerdrv: introduce default_downstream_reset_link PCI: aerdrv: rework find_aer_service PCI: aerdrv: remove is_downstream PCI: aerdrv: remove magical ROOT_ERR_STATUS_MASKS PCI: aerdrv: redefine PCI_ERR_ROOT_*_SRC PCI: aerdrv: rework do_recovery PCI: aerdrv: rework get_e_source() ...
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c3
-rw-r--r--drivers/pci/hotplug/pciehp_pci.c17
2 files changed, 4 insertions, 16 deletions
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 6644337d63d6..b3e5580c837b 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -1075,13 +1075,12 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1075 1075
1076 /* make our own copy of the pci bus structure, 1076 /* make our own copy of the pci bus structure,
1077 * as we like tweaking it a lot */ 1077 * as we like tweaking it a lot */
1078 ctrl->pci_bus = kmalloc(sizeof(*ctrl->pci_bus), GFP_KERNEL); 1078 ctrl->pci_bus = kmemdup(pdev->bus, sizeof(*ctrl->pci_bus), GFP_KERNEL);
1079 if (!ctrl->pci_bus) { 1079 if (!ctrl->pci_bus) {
1080 err("out of memory\n"); 1080 err("out of memory\n");
1081 rc = -ENOMEM; 1081 rc = -ENOMEM;
1082 goto err_free_ctrl; 1082 goto err_free_ctrl;
1083 } 1083 }
1084 memcpy(ctrl->pci_bus, pdev->bus, sizeof(*ctrl->pci_bus));
1085 1084
1086 ctrl->bus = pdev->bus->number; 1085 ctrl->bus = pdev->bus->number;
1087 ctrl->rev = pdev->revision; 1086 ctrl->rev = pdev->revision;
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c
index 0a16444c14c9..2fce726758d2 100644
--- a/drivers/pci/hotplug/pciehp_pci.c
+++ b/drivers/pci/hotplug/pciehp_pci.c
@@ -84,12 +84,6 @@ int pciehp_configure_device(struct slot *p_slot)
84 dev = pci_get_slot(parent, PCI_DEVFN(0, fn)); 84 dev = pci_get_slot(parent, PCI_DEVFN(0, fn));
85 if (!dev) 85 if (!dev)
86 continue; 86 continue;
87 if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
88 ctrl_err(ctrl, "Cannot hot-add display device %s\n",
89 pci_name(dev));
90 pci_dev_put(dev);
91 continue;
92 }
93 if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) || 87 if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) ||
94 (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { 88 (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) {
95 pciehp_add_bridge(dev); 89 pciehp_add_bridge(dev);
@@ -133,15 +127,9 @@ int pciehp_unconfigure_device(struct slot *p_slot)
133 presence = 0; 127 presence = 0;
134 128
135 for (j = 0; j < 8; j++) { 129 for (j = 0; j < 8; j++) {
136 struct pci_dev* temp = pci_get_slot(parent, PCI_DEVFN(0, j)); 130 struct pci_dev *temp = pci_get_slot(parent, PCI_DEVFN(0, j));
137 if (!temp) 131 if (!temp)
138 continue; 132 continue;
139 if ((temp->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
140 ctrl_err(ctrl, "Cannot remove display device %s\n",
141 pci_name(temp));
142 pci_dev_put(temp);
143 continue;
144 }
145 if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE && presence) { 133 if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE && presence) {
146 pci_read_config_byte(temp, PCI_BRIDGE_CONTROL, &bctl); 134 pci_read_config_byte(temp, PCI_BRIDGE_CONTROL, &bctl);
147 if (bctl & PCI_BRIDGE_CTL_VGA) { 135 if (bctl & PCI_BRIDGE_CTL_VGA) {
@@ -149,7 +137,8 @@ int pciehp_unconfigure_device(struct slot *p_slot)
149 "Cannot remove display device %s\n", 137 "Cannot remove display device %s\n",
150 pci_name(temp)); 138 pci_name(temp));
151 pci_dev_put(temp); 139 pci_dev_put(temp);
152 continue; 140 rc = EINVAL;
141 break;
153 } 142 }
154 } 143 }
155 pci_remove_bus_device(temp); 144 pci_remove_bus_device(temp);