Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46719
b: refs/heads/master
c: 44ef4ce
h: refs/heads/master
i:
  46717: a84a63b
  46715: 1f016df
  46711: 7f529b0
  46703: fbca930
  46687: d85c594
  46655: a79361f
  46591: 94c827b
v: v3
  • Loading branch information
Kenji Kaneshige authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent 36cdd55 commit 292f175
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 194 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: 75e13178af33e20b5802885f637af2a82c64ac2c
refs/heads/master: 44ef4cefb0168740184ee3d7d18254339741e9d5
18 changes: 0 additions & 18 deletions trunk/drivers/pci/hotplug/pciehp.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,24 +173,6 @@ static inline struct slot *pciehp_find_slot(struct controller *ctrl, u8 device)
return NULL;
}

static inline int wait_for_ctrl_irq(struct controller *ctrl)
{
DECLARE_WAITQUEUE(wait, current);

add_wait_queue(&ctrl->queue, &wait);
if (!pciehp_poll_mode)
/* Sleep for up to 1 second */
msleep_interruptible(1000);
else
msleep_interruptible(2500);

remove_wait_queue(&ctrl->queue, &wait);
if (signal_pending(current))
return -EINTR;

return 0;
}

struct hpc_ops {
int (*power_on_slot)(struct slot *slot);
int (*power_off_slot)(struct slot *slot);
Expand Down
14 changes: 1 addition & 13 deletions trunk/drivers/pci/hotplug/pciehp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,25 +374,13 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
pciehp_ctrl_list = ctrl;
}

/* Wait for exclusive access to hardware */
mutex_lock(&ctrl->ctrl_lock);

t_slot->hpc_ops->get_adapter_status(t_slot, &value); /* Check if slot is occupied */

if ((POWER_CTRL(ctrl->ctrlcap)) && !value) {
rc = t_slot->hpc_ops->power_off_slot(t_slot); /* Power off slot if not occupied*/
if (rc) {
/* Done with exclusive hardware access */
mutex_unlock(&ctrl->ctrl_lock);
if (rc)
goto err_out_free_ctrl_slot;
} else
/* Wait for the command to complete */
wait_for_ctrl_irq (ctrl);
}

/* Done with exclusive hardware access */
mutex_unlock(&ctrl->ctrl_lock);

return 0;

err_out_free_ctrl_slot:
Expand Down
Loading

0 comments on commit 292f175

Please sign in to comment.