aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorPraveen Kalamegham <praveen@nextio.com>2010-05-19 18:03:12 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-05-21 17:43:46 -0400
commitac81860ea073daed50246af54db706c6e491f240 (patch)
tree6a4a722670d143b1c42cb4a288ea46f34b834d3f /drivers/pci
parent3f6ea84a3035cc0ef7488f8e93bc76766799e082 (diff)
PCI: hotplug: pciehp: Removed check for hotplug of display devices
Removed check to prevent hotplug of display devices within pciehp. Originally this was thought to have been required within the PCI Hotplug specification for some legacy devices. However there is no such requirement in the most recent revision. The check prevents hotplug of not only display devices but also computational GPUs which require serviceability. Signed-off-by: Praveen Kalamegham <praveen@nextio.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/pciehp_pci.c17
1 files changed, 3 insertions, 14 deletions
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);