|
@@ -262,7 +262,6 @@ static struct aer_rpc *aer_alloc_rpc(struct pcie_device *dev)
|
|
rpc->rpd = dev;
|
|
rpc->rpd = dev;
|
|
INIT_WORK(&rpc->dpc_handler, aer_isr);
|
|
INIT_WORK(&rpc->dpc_handler, aer_isr);
|
|
mutex_init(&rpc->rpc_mutex);
|
|
mutex_init(&rpc->rpc_mutex);
|
|
- init_waitqueue_head(&rpc->wait_release);
|
|
|
|
|
|
|
|
/* Use PCIe bus function to store rpc into PCIe device */
|
|
/* Use PCIe bus function to store rpc into PCIe device */
|
|
set_service_data(dev, rpc);
|
|
set_service_data(dev, rpc);
|
|
@@ -285,8 +284,7 @@ static void aer_remove(struct pcie_device *dev)
|
|
if (rpc->isr)
|
|
if (rpc->isr)
|
|
free_irq(dev->irq, dev);
|
|
free_irq(dev->irq, dev);
|
|
|
|
|
|
- wait_event(rpc->wait_release, rpc->prod_idx == rpc->cons_idx);
|
|
|
|
-
|
|
|
|
|
|
+ flush_work(&rpc->dpc_handler);
|
|
aer_disable_rootport(rpc);
|
|
aer_disable_rootport(rpc);
|
|
kfree(rpc);
|
|
kfree(rpc);
|
|
set_service_data(dev, NULL);
|
|
set_service_data(dev, NULL);
|