Store pointer to vendor struct, fix crash in lock.

This commit is contained in:
Adam Madsen
2020-11-01 19:16:25 -06:00
parent b8517880ea
commit db50c45f35
3 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -134,12 +134,12 @@ static int amd_vega10_reset(struct vendor_reset_dev *dev)
for (timeout = 100000; timeout; --timeout)
{
sol = RREG32(mmMP0_SMN_C2PMSG_81);
if (sol != 0xFFFFFFFF)
if (sol != 0xFFFFFFFF && sol != 0)
break;
udelay(1);
}
if (sol == 0xFFFFFFFF)
if (!sol)
{
pci_warn(dev->pdev, "Vega10: Timed out waiting for SOL to be valid\n");
return -EINVAL;