aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUma Krishnan <ukrishn@linux.vnet.ibm.com>2016-03-04 16:55:15 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2016-03-08 21:17:33 -0500
commit6ded8b3cbd9a6254da5a38f35e20aa3c316d9092 (patch)
tree4d2631d775952f9d5d97e1e5ea4b5fca5b8785ff
parent961487e46a87079a573348896a0d39c1cb10947d (diff)
cxlflash: Unmap problem state area before detaching master context
When operating in the PowerVM environment, the cxlflash module can receive an error from the hypervisor indicating that there are existing mappings in the page table for the process MMIO space. This issue exists because term_afu() currently invokes term_mc() before stop_afu(), allowing for the master context to be detached first and the problem state area to be unmapped second. To resolve this issue, stop_afu() should be called before term_mc(). Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/cxlflash/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index 3dbb9fa3019e..ca702d855c31 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -726,11 +726,11 @@ static void term_mc(struct cxlflash_cfg *cfg, enum undo_level level)
726 */ 726 */
727static void term_afu(struct cxlflash_cfg *cfg) 727static void term_afu(struct cxlflash_cfg *cfg)
728{ 728{
729 term_mc(cfg, UNDO_START);
730
731 if (cfg->afu) 729 if (cfg->afu)
732 stop_afu(cfg); 730 stop_afu(cfg);
733 731
732 term_mc(cfg, UNDO_START);
733
734 pr_debug("%s: returning\n", __func__); 734 pr_debug("%s: returning\n", __func__);
735} 735}
736 736
@@ -2492,8 +2492,8 @@ static pci_ers_result_t cxlflash_pci_error_detected(struct pci_dev *pdev,
2492 if (unlikely(rc)) 2492 if (unlikely(rc))
2493 dev_err(dev, "%s: Failed to mark user contexts!(%d)\n", 2493 dev_err(dev, "%s: Failed to mark user contexts!(%d)\n",
2494 __func__, rc); 2494 __func__, rc);
2495 term_mc(cfg, UNDO_START);
2496 stop_afu(cfg); 2495 stop_afu(cfg);
2496 term_mc(cfg, UNDO_START);
2497 return PCI_ERS_RESULT_NEED_RESET; 2497 return PCI_ERS_RESULT_NEED_RESET;
2498 case pci_channel_io_perm_failure: 2498 case pci_channel_io_perm_failure:
2499 cfg->state = STATE_FAILTERM; 2499 cfg->state = STATE_FAILTERM;