From 4ecfddfc0ede1b2da27939b7c7869a46cbeaad14 Mon Sep 17 00:00:00 2001 From: Adam Madsen Date: Sun, 1 Nov 2020 21:16:22 -0600 Subject: [PATCH] Unmap mmio post reset. --- src/amd/common.c | 5 +++++ src/amd/vega10.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/amd/common.c b/src/amd/common.c index f14c119..0a3a7a8 100644 --- a/src/amd/common.c +++ b/src/amd/common.c @@ -70,6 +70,11 @@ int amd_common_post_reset(struct vendor_reset_dev *dev) struct amd_vendor_private *priv = amd_private(dev); struct pci_dev *pdev = dev->pdev; + if (priv->mmio) { + iounmap(priv->mmio); + priv->mmio = NULL; + } + if (priv->saved_state) { pci_load_and_free_saved_state(pdev, &priv->saved_state); diff --git a/src/amd/vega10.c b/src/amd/vega10.c index 813ffb6..3661d5f 100644 --- a/src/amd/vega10.c +++ b/src/amd/vega10.c @@ -162,11 +162,11 @@ static int amd_vega10_reset(struct vendor_reset_dev *dev) smu_resp, sol, mp1_intr ? "yes" : "no", psp_bl_ready ? "yes" : "no"); - // if (!sol) - // { - // pci_warn(dev->pdev, "Vega10: Timed out waiting for SOL to be valid\n"); - // return -EINVAL; - // } + if (!sol) + { + pci_warn(dev->pdev, "Vega10: Timed out waiting for SOL to be valid\n"); + return -EINVAL; + } pci_info(dev->pdev, "Vega10: Entering BACO\n"); ret = vega10_baco_set_state(adev, BACO_STATE_IN);