diff options
author | Faisal Latif <faisal.latif@intel.com> | 2010-07-03 20:17:59 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-07-28 18:14:27 -0400 |
commit | cd6860eb036ab4320d591fdd056f86172438fae4 (patch) | |
tree | 8c787e118cb85a6014a8d5771f9b7dbab75708f8 /drivers/infiniband/hw/nes/nes_verbs.c | |
parent | 0eec495ee69e3fbbe2ef2b244a0a988a4fe2e887 (diff) |
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_verbs.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 9bc2d744b2e..3b95d0473b7 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
@@ -3058,6 +3058,7 @@ int nes_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
3058 | nesqp->hte_added = 0; | 3058 | nesqp->hte_added = 0; |
3059 | } | 3059 | } |
3060 | if ((nesqp->hw_tcp_state > NES_AEQE_TCP_STATE_CLOSED) && | 3060 | if ((nesqp->hw_tcp_state > NES_AEQE_TCP_STATE_CLOSED) && |
3061 | (nesdev->iw_status) && | ||
3061 | (nesqp->hw_tcp_state != NES_AEQE_TCP_STATE_TIME_WAIT)) { | 3062 | (nesqp->hw_tcp_state != NES_AEQE_TCP_STATE_TIME_WAIT)) { |
3062 | next_iwarp_state |= NES_CQP_QP_RESET; | 3063 | next_iwarp_state |= NES_CQP_QP_RESET; |
3063 | } else { | 3064 | } else { |
@@ -3936,6 +3937,17 @@ struct nes_ib_device *nes_init_ofa_device(struct net_device *netdev) | |||
3936 | return nesibdev; | 3937 | return nesibdev; |
3937 | } | 3938 | } |
3938 | 3939 | ||
3940 | void nes_port_ibevent(struct nes_vnic *nesvnic) | ||
3941 | { | ||
3942 | struct nes_ib_device *nesibdev = nesvnic->nesibdev; | ||
3943 | struct nes_device *nesdev = nesvnic->nesdev; | ||
3944 | struct ib_event event; | ||
3945 | event.device = &nesibdev->ibdev; | ||
3946 | event.element.port_num = nesvnic->logical_port + 1; | ||
3947 | event.event = nesdev->iw_status ? IB_EVENT_PORT_ACTIVE : IB_EVENT_PORT_ERR; | ||
3948 | ib_dispatch_event(&event); | ||
3949 | } | ||
3950 | |||
3939 | 3951 | ||
3940 | /** | 3952 | /** |
3941 | * nes_destroy_ofa_device | 3953 | * nes_destroy_ofa_device |