Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[sfrench/cifs-2.6.git] / drivers / infiniband / ulp / iser / iser_initiator.c
index 278fcbccc2d995e21b167d7623575009f2fa948c..ba1b455949c0631f30fbc7f8882a744bf12e5165 100644 (file)
@@ -34,8 +34,6 @@
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
-#include <asm/io.h>
-#include <asm/scatterlist.h>
 #include <linux/scatterlist.h>
 #include <linux/kfifo.h>
 #include <scsi/scsi_cmnd.h>
@@ -201,7 +199,7 @@ static int iser_post_receive_control(struct iscsi_conn *conn)
         * what's common for both schemes is that the connection is not started
         */
        if (conn->c_stage != ISCSI_CONN_STARTED)
-               rx_data_size = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH;
+               rx_data_size = ISCSI_DEF_MAX_RECV_SEG_LEN;
        else /* FIXME till user space sets conn->max_recv_dlength correctly */
                rx_data_size = 128;
 
@@ -351,18 +349,12 @@ int iser_send_command(struct iscsi_conn     *conn,
        else
                data_buf = &iser_ctask->data[ISER_DIR_OUT];
 
-       if (sc->use_sg) { /* using a scatter list */
-               data_buf->buf  = sc->request_buffer;
-               data_buf->size = sc->use_sg;
-       } else if (sc->request_bufflen) {
-               /* using a single buffer - convert it into one entry SG */
-               sg_init_one(&data_buf->sg_single,
-                           sc->request_buffer, sc->request_bufflen);
-               data_buf->buf   = &data_buf->sg_single;
-               data_buf->size  = 1;
+       if (scsi_sg_count(sc)) { /* using a scatter list */
+               data_buf->buf  = scsi_sglist(sc);
+               data_buf->size = scsi_sg_count(sc);
        }
 
-       data_buf->data_len = sc->request_bufflen;
+       data_buf->data_len = scsi_bufflen(sc);
 
        if (hdr->flags & ISCSI_FLAG_CMD_READ) {
                err = iser_prepare_read_cmd(ctask, edtl);
@@ -569,7 +561,7 @@ void iser_rcv_completion(struct iser_desc *rx_desc,
        if (opcode == ISCSI_OP_SCSI_CMD_RSP) {
                itt = get_itt(hdr->itt); /* mask out cid and age bits */
                if (!(itt < session->cmds_max))
-                       iser_err("itt can't be matched to task!!!"
+                       iser_err("itt can't be matched to task!!! "
                                 "conn %p opcode %d cmds_max %d itt %d\n",
                                 conn->iscsi_conn,opcode,session->cmds_max,itt);
                /* use the mapping given with the cmds array indexed by itt */