summaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorRamachandra K <ramachandra.kuchimanchi@qlogic.com>2009-02-27 10:33:12 -0800
committerRoland Dreier <rolandd@cisco.com>2009-02-27 10:33:12 -0800
commit7020cb0fe216fdcec246cdc2412614a3190fbb2f (patch)
tree73fefbde0a05e9598b0ff871eca631aeea495e61 /include/rdma
parentf3b8436ad9a8ad36b3c9fa1fe030c7f38e5d3d0b (diff)
downloadop-kernel-dev-7020cb0fe216fdcec246cdc2412614a3190fbb2f.zip
op-kernel-dev-7020cb0fe216fdcec246cdc2412614a3190fbb2f.tar.gz
IB/mad: Fix RMPP header RRespTime manipulation
Fix ib_set_rmpp_flags() to use the correct bit mask for RRespTime. In the 8-bit field of the RMPP header, the first 5 bits are RRespTime and next 3 bits are RMPPFlags. Hence to retain the first 5 bits, the mask should be 0xF8 instead of 0xF1. ack_recv()-->format_ack() calls ib_set_rmpp_flags() and due to the incorrect ANDing with 0xF1, RRespTime got changed incorrectly and RMPP Acks sent back always had a RRespTime of 0x1E (30) which caused the other end to consider the time outs to be approximately 4297 seconds (i.e. in the order of 4*2^30) instead of the usual ~4 seconds (order of 4*2^20). Signed-off-by: Ramachandra K <ramachandra.kuchimanchi@qlogic.com> Acked-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_mad.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h
index 5f6c40f..1a0f409 100644
--- a/include/rdma/ib_mad.h
+++ b/include/rdma/ib_mad.h
@@ -290,7 +290,7 @@ static inline void ib_set_rmpp_resptime(struct ib_rmpp_hdr *rmpp_hdr, u8 rtime)
*/
static inline void ib_set_rmpp_flags(struct ib_rmpp_hdr *rmpp_hdr, u8 flags)
{
- rmpp_hdr->rmpp_rtime_flags = (rmpp_hdr->rmpp_rtime_flags & 0xF1) |
+ rmpp_hdr->rmpp_rtime_flags = (rmpp_hdr->rmpp_rtime_flags & 0xF8) |
(flags & 0x7);
}
OpenPOWER on IntegriCloud