Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41215
b: refs/heads/master
c: 9f581f1
h: refs/heads/master
i:
  41213: e61d6f4
  41211: ae65b9c
  41207: 04e917f
  41199: 9de893c
  41183: 804ae7d
  41151: 7f45c39
  41087: a3d2033
  40959: 33a155d
v: v3
  • Loading branch information
John Keller authored and Greg Kroah-Hartman committed Dec 1, 2006
1 parent 5cdd830 commit a7d6345
Show file tree
Hide file tree
Showing 2 changed files with 14 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: 8ea6091f500162e97687d7acf925f84202066b8d
refs/heads/master: 9f581f162e2b304be25dee49bf3945d4ed65dfb6
35 changes: 13 additions & 22 deletions trunk/drivers/pci/hotplug/sgi_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,6 @@ static struct hotplug_slot * sn_hp_destroy(void)
return bss_hotplug_slot;
}

static void sn_bus_alloc_data(struct pci_dev *dev)
{
struct pci_bus *subordinate_bus;
struct pci_dev *child;

sn_pci_fixup_slot(dev);

/* Recursively sets up the sn_irq_info structs */
if (dev->subordinate) {
subordinate_bus = dev->subordinate;
list_for_each_entry(child, &subordinate_bus->devices, bus_list)
sn_bus_alloc_data(child);
}
}

static void sn_bus_free_data(struct pci_dev *dev)
{
struct pci_bus *subordinate_bus;
Expand Down Expand Up @@ -337,6 +322,11 @@ static int sn_slot_disable(struct hotplug_slot *bss_hotplug_slot,
return rc;
}

/*
* Power up and configure the slot via a SAL call to PROM.
* Scan slot (and any children), do any platform specific fixup,
* and find device driver.
*/
static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
{
struct slot *slot = bss_hotplug_slot->private;
Expand All @@ -345,6 +335,7 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
int func, num_funcs;
int new_ppb = 0;
int rc;
void pcibios_fixup_device_resources(struct pci_dev *);

/* Serialize the Linux PCI infrastructure */
mutex_lock(&sn_hotplug_mutex);
Expand All @@ -367,9 +358,6 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
return -ENODEV;
}

sn_pci_controller_fixup(pci_domain_nr(slot->pci_bus),
slot->pci_bus->number,
slot->pci_bus);
/*
* Map SN resources for all functions on the card
* to the Linux PCI interface and tell the drivers
Expand All @@ -380,19 +368,22 @@ static int enable_slot(struct hotplug_slot *bss_hotplug_slot)
PCI_DEVFN(slot->device_num + 1,
PCI_FUNC(func)));
if (dev) {
/* Need to do slot fixup on PPB before fixup of children
* (PPB's pcidev_info needs to be in pcidev_info list
* before child's SN_PCIDEV_INFO() call to setup
* pdi_host_pcidev_info).
*/
pcibios_fixup_device_resources(dev);
sn_pci_fixup_slot(dev);
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
unsigned char sec_bus;
pci_read_config_byte(dev, PCI_SECONDARY_BUS,
&sec_bus);
new_bus = pci_add_new_bus(dev->bus, dev,
sec_bus);
pci_scan_child_bus(new_bus);
sn_pci_controller_fixup(pci_domain_nr(new_bus),
new_bus->number,
new_bus);
new_ppb = 1;
}
sn_bus_alloc_data(dev);
pci_dev_put(dev);
}
}
Expand Down

0 comments on commit a7d6345

Please sign in to comment.