aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorPraveen Kalamegham <praveen@nextio.com>2010-05-20 13:15:01 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-07-30 12:29:16 -0400
commit0ba10bc75271e4139eb9ca67d107624d581e3a94 (patch)
tree3190954fc57e9c387b80514751fb28e6a87f6c5e /drivers/pci
parent01b666df487b80c956cef3ce3253776ddeebd41e (diff)
PCI hotplug: shpchp: Removed check for hotplug of display devices
Removed check to prevent hotplug of display devices within shpchp. 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/shpchp_pci.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c
index 8c3d3219f227..a2ccfcd3c298 100644
--- a/drivers/pci/hotplug/shpchp_pci.c
+++ b/drivers/pci/hotplug/shpchp_pci.c
@@ -60,12 +60,6 @@ int __ref shpchp_configure_device(struct slot *p_slot)
60 dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, fn)); 60 dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, fn));
61 if (!dev) 61 if (!dev)
62 continue; 62 continue;
63 if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
64 ctrl_err(ctrl, "Cannot hot-add display device %s\n",
65 pci_name(dev));
66 pci_dev_put(dev);
67 continue;
68 }
69 if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) || 63 if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) ||
70 (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) { 64 (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) {
71 /* Find an unused bus number for the new bridge */ 65 /* Find an unused bus number for the new bridge */
@@ -114,17 +108,11 @@ int shpchp_unconfigure_device(struct slot *p_slot)
114 ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n", 108 ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n",
115 __func__, pci_domain_nr(parent), p_slot->bus, p_slot->device); 109 __func__, pci_domain_nr(parent), p_slot->bus, p_slot->device);
116 110
117 for (j=0; j<8 ; j++) { 111 for (j = 0; j < 8 ; j++) {
118 struct pci_dev* temp = pci_get_slot(parent, 112 struct pci_dev *temp = pci_get_slot(parent,
119 (p_slot->device << 3) | j); 113 (p_slot->device << 3) | j);
120 if (!temp) 114 if (!temp)
121 continue; 115 continue;
122 if ((temp->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
123 ctrl_err(ctrl, "Cannot remove display device %s\n",
124 pci_name(temp));
125 pci_dev_put(temp);
126 continue;
127 }
128 if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE) { 116 if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
129 pci_read_config_byte(temp, PCI_BRIDGE_CONTROL, &bctl); 117 pci_read_config_byte(temp, PCI_BRIDGE_CONTROL, &bctl);
130 if (bctl & PCI_BRIDGE_CTL_VGA) { 118 if (bctl & PCI_BRIDGE_CTL_VGA) {
@@ -132,7 +120,8 @@ int shpchp_unconfigure_device(struct slot *p_slot)
132 "Cannot remove display device %s\n", 120 "Cannot remove display device %s\n",
133 pci_name(temp)); 121 pci_name(temp));
134 pci_dev_put(temp); 122 pci_dev_put(temp);
135 continue; 123 rc = -EINVAL;
124 break;
136 } 125 }
137 } 126 }
138 pci_remove_bus_device(temp); 127 pci_remove_bus_device(temp);