summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/nes/nes_nic.c
diff options
context:
space:
mode:
authorFaisal Latif <faisal.latif@intel.com>2010-07-04 04:17:59 +0400
committerRoland Dreier <rolandd@cisco.com>2010-07-29 02:14:27 +0400
commitcd6860eb036ab4320d591fdd056f86172438fae4 (patch)
tree8c787e118cb85a6014a8d5771f9b7dbab75708f8 /drivers/infiniband/hw/nes/nes_nic.c
parent0eec495ee69e3fbbe2ef2b244a0a988a4fe2e887 (diff)
downloadlinux-cd6860eb036ab4320d591fdd056f86172438fae4.tar.xz
RDMA/nes: Fix hangs on ifdown
When ib_unregister_device() is called from netdev stop during ifdown, it sometimes hangs. Changes made to indicate port_err to ib_dispatch_event() during netdev stop and port_active during netdev open. The ib_unregister_device() is only called during remove of the module. Signed-off-by: Faisal Latif <faisal.latif@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_nic.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 5cc0a9ae5bb1..c0c404ee3bc4 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -232,6 +232,13 @@ static int nes_netdev_open(struct net_device *netdev)
NES_MAC_INT_TX_UNDERFLOW | NES_MAC_INT_TX_ERROR));
first_nesvnic = nesvnic;
}
+
+ if (nesvnic->of_device_registered) {
+ nesdev->iw_status = 1;
+ nesdev->nesadapter->send_term_ok = 1;
+ nes_port_ibevent(nesvnic);
+ }
+
if (first_nesvnic->linkup) {
/* Enable network packets */
nesvnic->linkup = 1;
@@ -309,9 +316,9 @@ static int nes_netdev_stop(struct net_device *netdev)
if (nesvnic->of_device_registered) {
- nes_destroy_ofa_device(nesvnic->nesibdev);
- nesvnic->nesibdev = NULL;
- nesvnic->of_device_registered = 0;
+ nesdev->nesadapter->send_term_ok = 0;
+ nesdev->iw_status = 0;
+ nes_port_ibevent(nesvnic);
}
nes_destroy_nic_qp(nesvnic);