qede: Fix ref-cnt usage count
authorMichal Kalderon <Michal.Kalderon@cavium.com>
Sun, 13 May 2018 17:54:06 +0000 (20:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 May 2018 00:26:24 +0000 (20:26 -0400)
commit91dfd02b23006e7cc557bcb3a40aeb740f66fb52
tree27af477125c58d5519607d874079db7ec0bd7507
parent55c82617c3e82210b7471e9334e8fc5df6a9961f
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>
drivers/net/ethernet/qlogic/qede/qede_main.c