summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMichal Kalderon <Michal.Kalderon@cavium.com>2018-05-13 20:54:06 +0300
committerDavid S. Miller <davem@davemloft.net>2018-05-13 20:26:24 -0400
commit91dfd02b23006e7cc557bcb3a40aeb740f66fb52 (patch)
tree27af477125c58d5519607d874079db7ec0bd7507 /drivers/net
parent55c82617c3e82210b7471e9334e8fc5df6a9961f (diff)
downloadlinux-91dfd02b23006e7cc557bcb3a40aeb740f66fb52.tar.gz
linux-91dfd02b23006e7cc557bcb3a40aeb740f66fb52.tar.bz2
linux-91dfd02b23006e7cc557bcb3a40aeb740f66fb52.zip
qede: Fix ref-cnt usage count
Rebooting while qedr is loaded with a VLAN interface present results in unregister_netdevice waiting for the usage count to become free. The fix is that rdma devices should be removed before unregistering the netdevice, to assure all references to ndev are decreased. Fixes: cee9fbd8e2e9 ("qede: Add qedr framework") Signed-off-by: Ariel Elior <ariel.elior@cavium.com> Signed-off-by: Michal Kalderon <michal.kalderon@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/qlogic/qede/qede_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index a01e7d6e5442..f6655e251bbd 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -1066,13 +1066,12 @@ static void __qede_remove(struct pci_dev *pdev, enum qede_remove_mode mode)
DP_INFO(edev, "Starting qede_remove\n");
+ qede_rdma_dev_remove(edev);
unregister_netdev(ndev);
cancel_delayed_work_sync(&edev->sp_task);
qede_ptp_disable(edev);
- qede_rdma_dev_remove(edev);
-
edev->ops->common->set_power_state(cdev, PCI_D0);
pci_set_drvdata(pdev, NULL);