aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2008-06-26 07:07:33 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-06-27 16:01:03 -0400
commit3aa50c44628629a6d58f93e0a1244e95a874884e (patch)
treeac0eac6b246af6422e4731f46fba64bd4b8a251f /drivers/pci
parentc4635eb06af700820d658a163f06aff12e17cfb2 (diff)
pciehp: remove needless command completed interrupt setting
Currently, pciehp driver enables command completed interrupt as follows. (1) Don't enable at initialization. (2) Enable command completed interrupt whenever pciehp issues a command, if the command doesn't attempt to disable the interrupt. (3) Disable command completed interrupt at driver unloading. Once we enable command completed interrupt, we don't need to re-enable it for every command. So we can simplify above steps as follows: (1) Enable command completed interrupt at initialization. (2) No special sequence for command completed interrupt. (3) Disable command completed interrupt at driver unloading. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 1ce52437e1ed..1323a43285d7 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -337,10 +337,6 @@ static int pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask)
337 337
338 slot_ctrl &= ~mask; 338 slot_ctrl &= ~mask;
339 slot_ctrl |= (cmd & mask); 339 slot_ctrl |= (cmd & mask);
340 /* Don't enable command completed if caller is changing it. */
341 if (!(mask & CMD_CMPL_INTR_ENABLE))
342 slot_ctrl |= CMD_CMPL_INTR_ENABLE;
343
344 ctrl->cmd_busy = 1; 340 ctrl->cmd_busy = 1;
345 smp_mb(); 341 smp_mb();
346 retval = pciehp_writew(ctrl, SLOTCTRL, slot_ctrl); 342 retval = pciehp_writew(ctrl, SLOTCTRL, slot_ctrl);
@@ -996,10 +992,10 @@ int pcie_enable_notification(struct controller *ctrl)
996 if (MRL_SENS(ctrl)) 992 if (MRL_SENS(ctrl))
997 cmd |= MRL_DETECT_ENABLE; 993 cmd |= MRL_DETECT_ENABLE;
998 if (!pciehp_poll_mode) 994 if (!pciehp_poll_mode)
999 cmd |= HP_INTR_ENABLE; 995 cmd |= HP_INTR_ENABLE | CMD_CMPL_INTR_ENABLE;
1000 996
1001 mask = PRSN_DETECT_ENABLE | ATTN_BUTTN_ENABLE | 997 mask = PRSN_DETECT_ENABLE | ATTN_BUTTN_ENABLE | MRL_DETECT_ENABLE |
1002 PWR_FAULT_DETECT_ENABLE | MRL_DETECT_ENABLE | HP_INTR_ENABLE; 998 PWR_FAULT_DETECT_ENABLE | HP_INTR_ENABLE | CMD_CMPL_INTR_ENABLE;
1003 999
1004 if (pcie_write_cmd(ctrl, cmd, mask)) { 1000 if (pcie_write_cmd(ctrl, cmd, mask)) {
1005 err("%s: Cannot enable software notification\n", __func__); 1001 err("%s: Cannot enable software notification\n", __func__);