Beispiel #1
0
static void cxl_remove(struct pci_dev *dev)
{
	struct cxl *adapter = pci_get_drvdata(dev);
	int afu;

	dev_warn(&dev->dev, "pci remove\n");

	/*
	 * Lock to prevent someone grabbing a ref through the adapter list as
	 * we are removing it
	 */
	for (afu = 0; afu < adapter->slices; afu++)
		cxl_remove_afu(adapter->afu[afu]);
	cxl_remove_adapter(adapter);
}
Beispiel #2
0
static void cxl_remove(struct pci_dev *dev)
{
	struct cxl *adapter = pci_get_drvdata(dev);
	struct cxl_afu *afu;
	int i;

	/*
	 * Lock to prevent someone grabbing a ref through the adapter list as
	 * we are removing it
	 */
	for (i = 0; i < adapter->slices; i++) {
		afu = adapter->afu[i];
		cxl_pci_vphb_remove(afu);
		cxl_remove_afu(afu);
	}
	cxl_remove_adapter(adapter);
}