diff options
author | Faisal Latif <faisal.latif@intel.com> | 2010-07-04 04:17:59 +0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-07-29 02:14:27 +0400 |
commit | cd6860eb036ab4320d591fdd056f86172438fae4 (patch) | |
tree | 8c787e118cb85a6014a8d5771f9b7dbab75708f8 /drivers/infiniband/hw/nes/nes_hw.c | |
parent | 0eec495ee69e3fbbe2ef2b244a0a988a4fe2e887 (diff) | |
download | linux-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_hw.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index f41d890956a1..199107abf195 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c @@ -3283,9 +3283,15 @@ static void nes_terminate_connection(struct nes_device *nesdev, struct nes_qp *n else mod_qp_flags |= NES_CQP_QP_TERM_DONT_SEND_TERM_MSG; - nes_terminate_start_timer(nesqp); - nesqp->term_flags |= NES_TERM_SENT; - nes_hw_modify_qp(nesdev, nesqp, mod_qp_flags, termlen, 0); + if (!nesdev->iw_status) { + nesqp->term_flags = NES_TERM_DONE; + nes_hw_modify_qp(nesdev, nesqp, NES_CQP_QP_IWARP_STATE_ERROR, 0, 0); + nes_cm_disconn(nesqp); + } else { + nes_terminate_start_timer(nesqp); + nesqp->term_flags |= NES_TERM_SENT; + nes_hw_modify_qp(nesdev, nesqp, mod_qp_flags, termlen, 0); + } } static void nes_terminate_send_fin(struct nes_device *nesdev, |