Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19259
b: refs/heads/master
c: 8737d6a
h: refs/heads/master
i:
  19257: cb6967c
  19255: 534336f
v: v3
  • Loading branch information
linas@austin.ibm.com authored and Greg Kroah-Hartman committed Feb 1, 2006
1 parent 8591cb4 commit 6764d97
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 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: b64a71ab5c9098a79ccb463af968933483458a0f
refs/heads/master: 8737d6a90cd8b085c2ea9cb4c7443c87f86c3429
44 changes: 22 additions & 22 deletions trunk/drivers/pci/hotplug/rpadlpar_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ static struct slot *find_slot(struct device_node *dn)
struct list_head *tmp, *n;
struct slot *slot;

list_for_each_safe(tmp, n, &rpaphp_slot_head) {
slot = list_entry(tmp, struct slot, rpaphp_slot_list);
if (slot->dn == dn)
return slot;
}
list_for_each_safe(tmp, n, &rpaphp_slot_head) {
slot = list_entry(tmp, struct slot, rpaphp_slot_list);
if (slot->dn == dn)
return slot;
}

return NULL;
return NULL;
}

static struct pci_dev *dlpar_find_new_dev(struct pci_bus *parent,
Expand All @@ -126,9 +126,9 @@ static struct pci_dev *dlpar_find_new_dev(struct pci_bus *parent,
return NULL;
}

static struct pci_dev *dlpar_pci_add_bus(struct device_node *dn)
static void dlpar_pci_add_bus(struct device_node *dn)
{
struct pci_dn *pdn = dn->data;
struct pci_dn *pdn = PCI_DN(dn);
struct pci_controller *phb = pdn->phb;
struct pci_dev *dev = NULL;

Expand All @@ -139,7 +139,7 @@ static struct pci_dev *dlpar_pci_add_bus(struct device_node *dn)
if (!dev) {
printk(KERN_ERR "%s: failed to create pci dev for %s\n",
__FUNCTION__, dn->full_name);
return NULL;
return;
}

if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
Expand All @@ -156,35 +156,35 @@ static struct pci_dev *dlpar_pci_add_bus(struct device_node *dn)

/* Add new devices to global lists. Register in proc, sysfs. */
pci_bus_add_devices(phb->bus);

/* Confirm new bridge dev was created */
dev = dlpar_find_new_dev(phb->bus, dn);
if (dev) {
if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
printk(KERN_ERR "%s: unexpected header type %d\n",
__FUNCTION__, dev->hdr_type);
return NULL;
}
}

return dev;
}

static int dlpar_add_pci_slot(char *drc_name, struct device_node *dn)
{
struct pci_dev *dev;
struct pci_controller *phb;

if (pcibios_find_pci_bus(dn))
return -EINVAL;

/* Add pci bus */
dev = dlpar_pci_add_bus(dn);
dlpar_pci_add_bus(dn);

/* Confirm new bridge dev was created */
phb = PCI_DN(dn)->phb;
dev = dlpar_find_new_dev(phb->bus, dn);

if (!dev) {
printk(KERN_ERR "%s: unable to add bus %s\n", __FUNCTION__,
drc_name);
return -EIO;
}

if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
printk(KERN_ERR "%s: unexpected header type %d, unable to add bus %s\n",
__FUNCTION__, dev->hdr_type, drc_name);
return -EIO;
}

/* Add hotplug slot */
if (rpaphp_add_slot(dn)) {
printk(KERN_ERR "%s: unable to add hotplug slot %s\n",
Expand Down

0 comments on commit 6764d97

Please sign in to comment.