Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206095
b: refs/heads/master
c: 0ba10bc
h: refs/heads/master
i:
  206093: 69cfeb6
  206091: 9f54e19
  206087: 2024188
  206079: e87a735
v: v3
  • Loading branch information
Praveen Kalamegham authored and Jesse Barnes committed Jul 30, 2010
1 parent 7e23fc7 commit 3c5a72d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01b666df487b80c956cef3ce3253776ddeebd41e
refs/heads/master: 0ba10bc75271e4139eb9ca67d107624d581e3a94
19 changes: 4 additions & 15 deletions trunk/drivers/pci/hotplug/shpchp_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ int __ref shpchp_configure_device(struct slot *p_slot)
dev = pci_get_slot(parent, PCI_DEVFN(p_slot->device, fn));
if (!dev)
continue;
if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
ctrl_err(ctrl, "Cannot hot-add display device %s\n",
pci_name(dev));
pci_dev_put(dev);
continue;
}
if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) ||
(dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)) {
/* Find an unused bus number for the new bridge */
Expand Down Expand Up @@ -114,25 +108,20 @@ int shpchp_unconfigure_device(struct slot *p_slot)
ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n",
__func__, pci_domain_nr(parent), p_slot->bus, p_slot->device);

for (j=0; j<8 ; j++) {
struct pci_dev* temp = pci_get_slot(parent,
for (j = 0; j < 8 ; j++) {
struct pci_dev *temp = pci_get_slot(parent,
(p_slot->device << 3) | j);
if (!temp)
continue;
if ((temp->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
ctrl_err(ctrl, "Cannot remove display device %s\n",
pci_name(temp));
pci_dev_put(temp);
continue;
}
if (temp->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
pci_read_config_byte(temp, PCI_BRIDGE_CONTROL, &bctl);
if (bctl & PCI_BRIDGE_CTL_VGA) {
ctrl_err(ctrl,
"Cannot remove display device %s\n",
pci_name(temp));
pci_dev_put(temp);
continue;
rc = -EINVAL;
break;
}
}
pci_remove_bus_device(temp);
Expand Down

0 comments on commit 3c5a72d

Please sign in to comment.