Skip to content

Commit

Permalink
IB/mad: Don't discard BMA responses in kernel
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Brooks authored and Roland Dreier committed Sep 21, 2008
1 parent 9824b8f commit 7097228
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1697,9 +1697,8 @@ static inline int rcv_has_same_gid(struct ib_mad_agent_private *mad_agent_priv,
u8 port_num = mad_agent_priv->agent.port_num;
u8 lmc;

send_resp = ((struct ib_mad *)(wr->send_buf.mad))->
mad_hdr.method & IB_MGMT_METHOD_RESP;
rcv_resp = rwc->recv_buf.mad->mad_hdr.method & IB_MGMT_METHOD_RESP;
send_resp = ib_response_mad((struct ib_mad *)wr->send_buf.mad);
rcv_resp = ib_response_mad(rwc->recv_buf.mad);

if (send_resp == rcv_resp)
/* both requests, or both responses. GIDs different */
Expand Down

0 comments on commit 7097228

Please sign in to comment.