Properly cleanup driver during remove_one() in mlx5core.
Cleanup all host resources, SYSCTLs, MSIX vectors and memory used by the host and only leave the device allocated memory behind, if any, because it may still be in use, when the PCI remove function is called. Else future probe calls may fail due to SYSCTLs already existing. MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking
This commit is contained in:
parent
e7a39b856a
commit
194ddc011a
@ -1665,9 +1665,8 @@ static void remove_one(struct pci_dev *pdev)
|
||||
struct mlx5_priv *priv = &dev->priv;
|
||||
|
||||
if (mlx5_unload_one(dev, priv, true)) {
|
||||
mlx5_core_err(dev, "mlx5_unload_one failed\n");
|
||||
mlx5_health_cleanup(dev);
|
||||
return;
|
||||
mlx5_core_err(dev, "mlx5_unload_one() failed, leaked %lld bytes\n",
|
||||
(long long)(dev->priv.fw_pages * MLX5_ADAPTER_PAGE_SIZE));
|
||||
}
|
||||
|
||||
mlx5_pagealloc_cleanup(dev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user