aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/iser/iser_initiator.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2007-06-01 18:56:21 +0900
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-18 19:48:43 -0500
commitda9c0c770e775e655e3f77c96d91ee557b117adb (patch)
treedc6f58cc48e120182915249fcb62718e8abec46d /drivers/infiniband/ulp/iser/iser_initiator.c
parent40fc79eb0223eccf44ed2e90fb11b9a08bcc7e09 (diff)
downloadkernel_samsung_smdk4412-da9c0c770e775e655e3f77c96d91ee557b117adb.zip
kernel_samsung_smdk4412-da9c0c770e775e655e3f77c96d91ee557b117adb.tar.gz
kernel_samsung_smdk4412-da9c0c770e775e655e3f77c96d91ee557b117adb.tar.bz2
[SCSI] iscsi_iser: convert to use the data buffer accessors
iscsi_iser: convert to use the data buffer accessors - remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. TODO: use scsi_for_each_sg(). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Erez Zilber <erezz@voltaire.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/infiniband/ulp/iser/iser_initiator.c')
-rw-r--r--drivers/infiniband/ulp/iser/iser_initiator.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
index 3651072..9ea5b9a 100644
--- a/drivers/infiniband/ulp/iser/iser_initiator.c
+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
@@ -351,18 +351,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);