Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174760
b: refs/heads/master
c: 8792e11
h: refs/heads/master
v: v3
  • Loading branch information
Kenji Kaneshige authored and Jesse Barnes committed Nov 4, 2009
1 parent 40edb70 commit ace7777
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 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: 65b947bc5f32d8d4fe1f925a6146a4088d5466f3
refs/heads/master: 8792e11f1c54bcba34412f03959e70ee217f2231
26 changes: 10 additions & 16 deletions trunk/drivers/pci/hotplug/pciehp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,13 @@ static int pciehp_probe(struct pcie_device *dev)
int rc;
struct controller *ctrl;
struct slot *slot;
u8 value;
struct pci_dev *pdev = dev->port;
u8 occupied, poweron;

if (pciehp_force)
dev_info(&dev->device,
"Bypassing BIOS check for pciehp use on %s\n",
pci_name(pdev));
else if (pciehp_get_hp_hw_control_from_firmware(pdev))
pci_name(dev->port));
else if (pciehp_get_hp_hw_control_from_firmware(dev->port))
goto err_out_none;

ctrl = pcie_init(dev);
Expand Down Expand Up @@ -290,18 +289,13 @@ static int pciehp_probe(struct pcie_device *dev)

/* Check if slot is occupied */
slot = ctrl->slot;
pciehp_get_adapter_status(slot, &value);
if (value) {
if (pciehp_force)
pciehp_enable_slot(slot);
} else {
/* Power off slot if not occupied */
if (POWER_CTRL(ctrl)) {
rc = pciehp_power_off_slot(slot);
if (rc)
goto err_out_free_ctrl_slot;
}
}
pciehp_get_adapter_status(slot, &occupied);
pciehp_get_power_status(slot, &poweron);
if (occupied && pciehp_force)
pciehp_enable_slot(slot);
/* If empty slot's power status is on, turn power off */
if (!occupied && poweron && POWER_CTRL(ctrl))
pciehp_power_off_slot(slot);

return 0;

Expand Down

0 comments on commit ace7777

Please sign in to comment.