aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2006-01-25 20:05:57 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 17:35:12 -0500
commite4e73041ecc4a3559c42ed9489f58531c2a8646b (patch)
treef74051398ce7fa52a6e429d755d7d56f0308f99b /drivers/pci/hotplug
parentbbe779db9f97e1c99b3c7ce1ebb26bbaecbdb2a9 (diff)
[PATCH] shpchp - Fix incorrect return value of interrupt handler
Current SHPCHP driver has a bug in its interrupt handler which cause "IRQ #: nobody cared" oops. This problem can be reproduced easily by the following operation. # cd /sys/bus/pci/slots/<slot#> # while true; do echo 1 > attention ; done & The reason is that when command complete interrupt is raised, current SHPCHP driver's interrupt handler returns IRQ_NONE regardless of if the interrupt is handled or not. This patch fixes this issue. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/shpchp_hpc.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index 1a6b5448f81d..943ed2b4dabe 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -1109,14 +1109,8 @@ static irqreturn_t shpc_isr(int IRQ, void *dev_id, struct pt_regs *regs)
1109 wake_up_interruptible(&ctrl->queue); 1109 wake_up_interruptible(&ctrl->queue);
1110 } 1110 }
1111 1111
1112 if ((intr_loc = (intr_loc >> 1)) == 0) { 1112 if ((intr_loc = (intr_loc >> 1)) == 0)
1113 /* Unmask Global Interrupt Mask */ 1113 goto out;
1114 temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);
1115 temp_dword &= 0xfffffffe;
1116 writel(temp_dword, php_ctlr->creg + SERR_INTR_ENABLE);
1117
1118 return IRQ_NONE;
1119 }
1120 1114
1121 for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) { 1115 for (hp_slot = 0; hp_slot < ctrl->num_slots; hp_slot++) {
1122 /* To find out which slot has interrupt pending */ 1116 /* To find out which slot has interrupt pending */
@@ -1146,6 +1140,7 @@ static irqreturn_t shpc_isr(int IRQ, void *dev_id, struct pt_regs *regs)
1146 dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2); 1140 dbg("%s: intr_loc2 = %x\n",__FUNCTION__, intr_loc2);
1147 } 1141 }
1148 } 1142 }
1143 out:
1149 if (!shpchp_poll_mode) { 1144 if (!shpchp_poll_mode) {
1150 /* Unmask Global Interrupt Mask */ 1145 /* Unmask Global Interrupt Mask */
1151 temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE); 1146 temp_dword = readl(php_ctlr->creg + SERR_INTR_ENABLE);