pciehp: Mask hotplug interrupt at controller release
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Fri, 25 Apr 2008 21:39:07 +0000 (14:39 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 25 Apr 2008 21:39:07 +0000 (14:39 -0700)
We must disable hotplug interrupt at controller relase time, otherwise
spurious interrupts might happen if any slot events occured (e.g. MRL
change) after unloading pciehp driver.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/hotplug/pciehp_hpc.c

index 4317513771d1c3b0dfe5977a531059092a8867a5..df1266cd68615c5fa8b2ad6264f59e10fa08f406 100644 (file)
@@ -537,6 +537,10 @@ static void hpc_set_green_led_blink(struct slot *slot)
 
 static void hpc_release_ctlr(struct controller *ctrl)
 {
+       /* Mask Hot-plug Interrupt Enable */
+       if (pcie_write_cmd(ctrl, 0, HP_INTR_ENABLE | CMD_CMPL_INTR_ENABLE))
+               err("%s: Cannot mask hotplut interrupt enable\n", __func__);
+
        if (pciehp_poll_mode)
                del_timer(&ctrl->poll_timer);
        else