diff options
author | Michael Brooks <michael.brooks@qlogic.com> | 2008-09-20 23:06:16 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-09-20 23:06:16 -0400 |
commit | 7097228c54e7348d8c8c6dccc96e50191e39c2f8 (patch) | |
tree | 2b04e5fc68f5ec5c3c1405e27f4a68c3cedbca2b /drivers/infiniband | |
parent | 9824b8f11373b0df806c135a342da9319ef1d893 (diff) |
IB/mad: Don't discard BMA responses in kernel
This fixes the problem of incoming BMA responses being dropped due to
a bad "is response" check. Fix the test to use the ib_response_mad()
predicate, which correctly handles BMA MADs.
This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=988>.
Signed-off-by: Michael Brooks <michael.brooks@qlogic.com>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/mad.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 1adf2efd3cb3..49c45feccd5b 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -1697,9 +1697,8 @@ static inline int rcv_has_same_gid(struct ib_mad_agent_private *mad_agent_priv, | |||
1697 | u8 port_num = mad_agent_priv->agent.port_num; | 1697 | u8 port_num = mad_agent_priv->agent.port_num; |
1698 | u8 lmc; | 1698 | u8 lmc; |
1699 | 1699 | ||
1700 | send_resp = ((struct ib_mad *)(wr->send_buf.mad))-> | 1700 | send_resp = ib_response_mad((struct ib_mad *)wr->send_buf.mad); |
1701 | mad_hdr.method & IB_MGMT_METHOD_RESP; | 1701 | rcv_resp = ib_response_mad(rwc->recv_buf.mad); |
1702 | rcv_resp = rwc->recv_buf.mad->mad_hdr.method & IB_MGMT_METHOD_RESP; | ||
1703 | 1702 | ||
1704 | if (send_resp == rcv_resp) | 1703 | if (send_resp == rcv_resp) |
1705 | /* both requests, or both responses. GIDs different */ | 1704 | /* both requests, or both responses. GIDs different */ |