cxl: Reset default context for vPHB on release
authorMichael Neuling <mikey@neuling.org>
Fri, 5 Jun 2015 04:38:26 +0000 (14:38 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 7 Jun 2015 09:12:39 +0000 (19:12 +1000)
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>
drivers/misc/cxl/vphb.c

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