Browse Source

cxl: Reset default context for vPHB on release

When we release the device, we should also invalidate the default context.
With this cxl_get_context() will return null after removal.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Michael Neuling 10 years ago
parent
commit
f67b4938af
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/misc/cxl/vphb.c

+ 1 - 0
drivers/misc/cxl/vphb.c

@@ -72,6 +72,7 @@ static void cxl_pci_disable_device(struct pci_dev *dev)
 			dev_err(&dev->dev, "Default context started\n");
 			dev_err(&dev->dev, "Default context started\n");
 			return;
 			return;
 		}
 		}
+		dev->dev.archdata.cxl_ctx = NULL;
 		cxl_release_context(ctx);
 		cxl_release_context(ctx);
 	}
 	}
 }
 }