From d3a2a54d48351f9796f9958f93c251229fcc4499 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 17 Jun 2010 16:33:37 +0000 Subject: [PATCH] Made sure endianness of ch->max_ti_iu_len is correct. The previous implementation could result in e.g. the following message in /var/log/messages: ib_srpt: Received SRP_LOGIN_REQ with i_port_id 0x200b000453000581:0x4538330005811, t_port_id 0x66a00980074b8:0x66a00980074b8 and it_iu_len 996 on port 1 (guid=0xfe80000000000000:0x66a00a00074b8) ... ib_srpt: ***WARNING***: truncated sense data from 18 to -469565476 bytes This patch was submitted by Chas Williams. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1777 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 5f128b55b..fa2a63562 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2152,7 +2152,7 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id, rsp->tag = req->tag; rsp->max_it_iu_len = req->req_it_iu_len; rsp->max_ti_iu_len = req->req_it_iu_len; - ch->max_ti_iu_len = req->req_it_iu_len; + ch->max_ti_iu_len = it_iu_len; rsp->buf_fmt = cpu_to_be16(SRP_BUF_FORMAT_DIRECT | SRP_BUF_FORMAT_INDIRECT); rsp->req_lim_delta = cpu_to_be32(SRPT_RQ_SIZE);