Skip to content

Commit d49f2c4

Browse files
kkaneshigegregkh
authored andcommitted
[PATCH] shpchp: Mask Global SERR and Intr at controller release time
Global SERR and Interrupt should be masked at shpchp driver unload time. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Cc: Kristen Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent e713872 commit d49f2c4

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎drivers/pci/hotplug/shpchp_hpc.c‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ static void hpc_release_ctlr(struct controller *ctrl)
798798
struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle;
799799
struct php_ctlr_state_s *p, *p_prev;
800800
int i;
801-
u32 slot_reg;
801+
u32 slot_reg, serr_int;
802802

803803
DBG_ENTER_ROUTINE
804804

@@ -822,6 +822,15 @@ static void hpc_release_ctlr(struct controller *ctrl)
822822

823823
cleanup_slots(ctrl);
824824

825+
/*
826+
* Mask SERR and System Interrut generation
827+
*/
828+
serr_int = shpc_readl(ctrl, SERR_INTR_ENABLE);
829+
serr_int |= (GLOBAL_INTR_MASK | GLOBAL_SERR_MASK |
830+
COMMAND_INTR_MASK | ARBITER_SERR_MASK);
831+
serr_int &= ~SERR_INTR_RSVDZ_MASK;
832+
shpc_writel(ctrl, SERR_INTR_ENABLE, serr_int);
833+
825834
if (shpchp_poll_mode) {
826835
del_timer(&php_ctlr->int_poll_timer);
827836
} else {

0 commit comments

Comments
 (0)