Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165971
b: refs/heads/master
c: 6aaa6d0
h: refs/heads/master
i:
  165969: ac1d166
  165967: 3ccbaed
v: v3
  • Loading branch information
Kenji Kaneshige authored and Jesse Barnes committed Sep 17, 2009
1 parent 3a0bcd4 commit 1e1ac99
Show file tree
Hide file tree
Showing 4 changed files with 1 addition 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: 5f9cab7af6f7ef1e3cbb25217617eb5bd082aa7b
refs/heads/master: 6aaa6d06f57f3689afe27c1fad256c5d6aa9b271
1 change: 0 additions & 1 deletion trunk/drivers/pci/hotplug/pciehp.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ struct event_info {
};

struct controller {
struct mutex crit_sect; /* critical section mutex */
struct mutex ctrl_lock; /* controller lock */
struct pci_dev *pci_dev;
struct pcie_device *pcie; /* PCI Express port service */
Expand Down
14 changes: 0 additions & 14 deletions trunk/drivers/pci/hotplug/pciehp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,21 +519,16 @@ int pciehp_enable_slot(struct slot *p_slot)
int rc;
struct controller *ctrl = p_slot->ctrl;

/* Check to see if (latch closed, card present, power off) */
mutex_lock(&p_slot->ctrl->crit_sect);

rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
if (rc || !getstatus) {
ctrl_info(ctrl, "No adapter on slot(%s)\n", slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
if (MRL_SENS(p_slot->ctrl)) {
rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
if (rc || getstatus) {
ctrl_info(ctrl, "Latch open on slot(%s)\n",
slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
}
Expand All @@ -543,7 +538,6 @@ int pciehp_enable_slot(struct slot *p_slot)
if (rc || getstatus) {
ctrl_info(ctrl, "Already enabled on slot(%s)\n",
slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -EINVAL;
}
}
Expand All @@ -557,7 +551,6 @@ int pciehp_enable_slot(struct slot *p_slot)

update_slot_info(p_slot);

mutex_unlock(&p_slot->ctrl->crit_sect);
return rc;
}

Expand All @@ -571,15 +564,11 @@ int pciehp_disable_slot(struct slot *p_slot)
if (!p_slot->ctrl)
return 1;

/* Check to see if (latch closed, card present, power on) */
mutex_lock(&p_slot->ctrl->crit_sect);

if (!HP_SUPR_RM(p_slot->ctrl)) {
ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
if (ret || !getstatus) {
ctrl_info(ctrl, "No adapter on slot(%s)\n",
slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
}
Expand All @@ -589,7 +578,6 @@ int pciehp_disable_slot(struct slot *p_slot)
if (ret || getstatus) {
ctrl_info(ctrl, "Latch open on slot(%s)\n",
slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -ENODEV;
}
}
Expand All @@ -599,15 +587,13 @@ int pciehp_disable_slot(struct slot *p_slot)
if (ret || !getstatus) {
ctrl_info(ctrl, "Already disabled on slot(%s)\n",
slot_name(p_slot));
mutex_unlock(&p_slot->ctrl->crit_sect);
return -EINVAL;
}
}

ret = remove_board(p_slot);
update_slot_info(p_slot);

mutex_unlock(&p_slot->ctrl->crit_sect);
return ret;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/pci/hotplug/pciehp_hpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,6 @@ struct controller *pcie_init(struct pcie_device *dev)

ctrl->slot_cap = slot_cap;
ctrl->hpc_ops = &pciehp_hpc_ops;
mutex_init(&ctrl->crit_sect);
mutex_init(&ctrl->ctrl_lock);
init_waitqueue_head(&ctrl->queue);
dbg_ctrl(ctrl);
Expand Down

0 comments on commit 1e1ac99

Please sign in to comment.