return;\r
}\r
\r
- /*\r
- * If the response indicates that the responder was busy, continue\r
- * retrying the request.\r
- */\r
- if( p_mad_hdr->status & IB_MAD_STATUS_BUSY )\r
- {\r
- AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
- ("responder busy TID:0x%I64x\n", p_mad_hdr->trans_id) );\r
- ib_put_mad( p_mad_element );\r
- return;\r
- }\r
-\r
/* Fully reassemble received MADs before completing them. */\r
if( __recv_requires_rmpp( h_mad_svc->svc_type, p_mad_element ) )\r
{\r
p_mad_hdr = ib_get_mad_buf( p_mad_element );\r
}\r
\r
+ /*\r
+ * If the response indicates that the responder was busy, continue\r
+ * retrying the request.\r
+ */\r
+ if( p_mad_hdr->status & IB_MAD_STATUS_BUSY )\r
+ {\r
+ AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR,\r
+ ("responder busy TID:0x%I64x\n", p_mad_hdr->trans_id) );\r
+ ib_put_mad( p_mad_element );\r
+ return;\r
+ }\r
+\r
/*\r
* See if the MAD was sent in response to a previously sent MAD. Note\r
* that trap repress messages are responses, even though the response\r
cl_memcpy( &p_ack_rmpp_hdr->common_hdr, &p_data_rmpp_hdr->common_hdr,\r
sizeof( ib_mad_t ) );\r
\r
+ /* Reset the status (in case the BUSY bit is set). */\r
+ p_ack_rmpp_hdr->common_hdr.status = 0;\r
+\r
/* Flip the response bit in the method */\r
p_ack_rmpp_hdr->common_hdr.method ^= IB_MAD_METHOD_RESP_MASK;\r
\r
\r
p_ack_rmpp_hdr->seg_num = cl_hton32( p_rmpp->expected_seg - 1 );\r
\r
- if (p_rmpp->seg_limit == p_rmpp->expected_seg - 1 )\r
+ if (p_rmpp->seg_limit == p_rmpp->expected_seg - 1 &&\r
+ !ib_rmpp_is_flag_set( p_data_rmpp_hdr, IB_RMPP_FLAG_LAST ) )\r
+ {\r
p_ack_rmpp_hdr->paylen_newwin = cl_hton32( 1 + p_rmpp->seg_limit);\r
+ }\r
else\r
+ {\r
p_ack_rmpp_hdr->paylen_newwin = cl_hton32( p_rmpp->seg_limit );\r
+ }\r
\r
return p_mad_element;\r
}\r