diff options
author | Varun Sethi <Varun.Sethi@freescale.com> | 2012-06-11 14:21:19 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-03-26 23:13:43 (GMT) |
commit | 4581d1a1421dc427050f13bbed4a4a0862acc237 (patch) | |
tree | e233d8981927d2795c9020002c1e96a9e0397faf | |
parent | ae0ecd82b44839ad19376d29376d8d7bc4133fbc (diff) | |
download | linux-fsl-qoriq-4581d1a1421dc427050f13bbed4a4a0862acc237.tar.xz |
powerpc/edac: Call work queue clean up routine only when edac_op_state is set to polling.
For pci errors we set the edac op state to "interrupt" and thus do not setup the work queue. While performing
edac pci device cleanup, work queue cleanup should only be performed if the op state is set to polling.
Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
Change-Id: Iee10865f671dc5d177a5a56cfc782673ef7ebd2f
Reviewed-on: http://git.am.freescale.net:8181/555
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
-rw-r--r-- | drivers/edac/edac_pci.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c index dd370f9..ce1e97f 100644 --- a/drivers/edac/edac_pci.c +++ b/drivers/edac/edac_pci.c @@ -392,6 +392,7 @@ EXPORT_SYMBOL_GPL(edac_pci_add_device); struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev) { struct edac_pci_ctl_info *pci; + int op_state; edac_dbg(0, "\n"); @@ -406,6 +407,8 @@ struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev) return NULL; } + op_state = pci->op_state; + pci->op_state = OP_OFFLINE; del_edac_pci_from_global_list(pci); @@ -413,7 +416,8 @@ struct edac_pci_ctl_info *edac_pci_del_device(struct device *dev) mutex_unlock(&edac_pci_ctls_mutex); /* stop the workq timer */ - edac_pci_workq_teardown(pci); + if (op_state == OP_RUNNING_POLL) + edac_pci_workq_teardown(pci); edac_printk(KERN_INFO, EDAC_PCI, "Removed device %d for %s %s: DEV %s\n", |