aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/shpchp_hpc.c
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2006-02-21 18:45:45 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 17:35:13 -0500
commitf7391f5325ea744f0632f7ef39a90085162743ac (patch)
treea7368b2ca639211743ba7fbc0dab7a9efaea02b7 /drivers/pci/hotplug/shpchp_hpc.c
parent68c0b671491088d79611fa965bbf94b3bc0024a4 (diff)
[PATCH] shpchp: event handling rework
The event handler of SHPCHP driver is unnecessarily very complex. In addition, current event handler can only a fixed number of events at the same time, and some of events would be lost if several number of events happened at the same time. This patch simplify the event handler by using 'work queue', and it also fix the above-mentioned issue. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/shpchp_hpc.c')
-rw-r--r--drivers/pci/hotplug/shpchp_hpc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index 943ed2b4dabe..b392606a905a 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -813,6 +813,7 @@ static void hpc_release_ctlr(struct controller *ctrl)
813{ 813{
814 struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle; 814 struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle;
815 struct php_ctlr_state_s *p, *p_prev; 815 struct php_ctlr_state_s *p, *p_prev;
816 int i;
816 817
817 DBG_ENTER_ROUTINE 818 DBG_ENTER_ROUTINE
818 819
@@ -821,6 +822,14 @@ static void hpc_release_ctlr(struct controller *ctrl)
821 return ; 822 return ;
822 } 823 }
823 824
825 /*
826 * Mask all slot event interrupts
827 */
828 for (i = 0; i < ctrl->num_slots; i++)
829 writel(0xffff3fff, php_ctlr->creg + SLOT1 + (4 * i));
830
831 cleanup_slots(ctrl);
832
824 if (shpchp_poll_mode) { 833 if (shpchp_poll_mode) {
825 del_timer(&php_ctlr->int_poll_timer); 834 del_timer(&php_ctlr->int_poll_timer);
826 } else { 835 } else {
@@ -830,6 +839,7 @@ static void hpc_release_ctlr(struct controller *ctrl)
830 pci_disable_msi(php_ctlr->pci_dev); 839 pci_disable_msi(php_ctlr->pci_dev);
831 } 840 }
832 } 841 }
842
833 if (php_ctlr->pci_dev) { 843 if (php_ctlr->pci_dev) {
834 iounmap(php_ctlr->creg); 844 iounmap(php_ctlr->creg);
835 release_mem_region(ctrl->mmio_base, ctrl->mmio_size); 845 release_mem_region(ctrl->mmio_base, ctrl->mmio_size);