[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>
This commit is contained in:
Kenji Kaneshige
2006-02-21 15:45:45 -08:00
committato da Greg Kroah-Hartman
parent 68c0b67149
commit f7391f5325
4 ha cambiato i file con 119 aggiunte e 266 eliminazioni

Vedi File

@@ -813,6 +813,7 @@ static void hpc_release_ctlr(struct controller *ctrl)
{
struct php_ctlr_state_s *php_ctlr = ctrl->hpc_ctlr_handle;
struct php_ctlr_state_s *p, *p_prev;
int i;
DBG_ENTER_ROUTINE
@@ -821,6 +822,14 @@ static void hpc_release_ctlr(struct controller *ctrl)
return ;
}
/*
* Mask all slot event interrupts
*/
for (i = 0; i < ctrl->num_slots; i++)
writel(0xffff3fff, php_ctlr->creg + SLOT1 + (4 * i));
cleanup_slots(ctrl);
if (shpchp_poll_mode) {
del_timer(&php_ctlr->int_poll_timer);
} else {
@@ -830,6 +839,7 @@ static void hpc_release_ctlr(struct controller *ctrl)
pci_disable_msi(php_ctlr->pci_dev);
}
}
if (php_ctlr->pci_dev) {
iounmap(php_ctlr->creg);
release_mem_region(ctrl->mmio_base, ctrl->mmio_size);