diff options
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_initiator.c | 14 |
2 files changed, 6 insertions, 12 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 1bf173decade..effdee299b0c 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -210,10 +210,10 @@ iscsi_iser_ctask_xmit(struct iscsi_conn *conn, | |||
210 | int error = 0; | 210 | int error = 0; |
211 | 211 | ||
212 | if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) { | 212 | if (ctask->sc->sc_data_direction == DMA_TO_DEVICE) { |
213 | BUG_ON(ctask->sc->request_bufflen == 0); | 213 | BUG_ON(scsi_bufflen(ctask->sc) == 0); |
214 | 214 | ||
215 | debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n", | 215 | debug_scsi("cmd [itt %x total %d imm %d unsol_data %d\n", |
216 | ctask->itt, ctask->sc->request_bufflen, | 216 | ctask->itt, scsi_bufflen(ctask->sc), |
217 | ctask->imm_count, ctask->unsol_count); | 217 | ctask->imm_count, ctask->unsol_count); |
218 | } | 218 | } |
219 | 219 | ||
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c index 3651072f6c1f..9ea5b9aaba7c 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, | |||
351 | else | 351 | else |
352 | data_buf = &iser_ctask->data[ISER_DIR_OUT]; | 352 | data_buf = &iser_ctask->data[ISER_DIR_OUT]; |
353 | 353 | ||
354 | if (sc->use_sg) { /* using a scatter list */ | 354 | if (scsi_sg_count(sc)) { /* using a scatter list */ |
355 | data_buf->buf = sc->request_buffer; | 355 | data_buf->buf = scsi_sglist(sc); |
356 | data_buf->size = sc->use_sg; | 356 | data_buf->size = scsi_sg_count(sc); |
357 | } else if (sc->request_bufflen) { | ||
358 | /* using a single buffer - convert it into one entry SG */ | ||
359 | sg_init_one(&data_buf->sg_single, | ||
360 | sc->request_buffer, sc->request_bufflen); | ||
361 | data_buf->buf = &data_buf->sg_single; | ||
362 | data_buf->size = 1; | ||
363 | } | 357 | } |
364 | 358 | ||
365 | data_buf->data_len = sc->request_bufflen; | 359 | data_buf->data_len = scsi_bufflen(sc); |
366 | 360 | ||
367 | if (hdr->flags & ISCSI_FLAG_CMD_READ) { | 361 | if (hdr->flags & ISCSI_FLAG_CMD_READ) { |
368 | err = iser_prepare_read_cmd(ctask, edtl); | 362 | err = iser_prepare_read_cmd(ctask, edtl); |