Merge branches 'ipoib' and 'iser' into for-next

This commit is contained in:
Roland Dreier 2011-08-17 10:57:43 -07:00
commit 80b43de837
3 changed files with 9 additions and 5 deletions

View File

@ -101,13 +101,17 @@ iscsi_iser_recv(struct iscsi_conn *conn,
/* verify PDU length */
datalen = ntoh24(hdr->dlength);
if (datalen != rx_data_len) {
printk(KERN_ERR "iscsi_iser: datalen %d (hdr) != %d (IB) \n",
datalen, rx_data_len);
if (datalen > rx_data_len || (datalen + 4) < rx_data_len) {
iser_err("wrong datalen %d (hdr), %d (IB)\n",
datalen, rx_data_len);
rc = ISCSI_ERR_DATALEN;
goto error;
}
if (datalen != rx_data_len)
iser_dbg("aligned datalen (%d) hdr, %d (IB)\n",
datalen, rx_data_len);
/* read AHS */
ahslen = hdr->hlength * 4;

View File

@ -89,7 +89,7 @@
} while (0)
#define SHIFT_4K 12
#define SIZE_4K (1UL << SHIFT_4K)
#define SIZE_4K (1ULL << SHIFT_4K)
#define MASK_4K (~(SIZE_4K-1))
/* support up to 512KB in one RDMA */

View File

@ -412,7 +412,7 @@ int iser_send_control(struct iscsi_conn *conn,
memcpy(iser_conn->ib_conn->login_buf, task->data,
task->data_count);
tx_dsg->addr = iser_conn->ib_conn->login_dma;
tx_dsg->length = data_seg_len;
tx_dsg->length = task->data_count;
tx_dsg->lkey = device->mr->lkey;
mdesc->num_sge = 2;
}