Commit c13e5566 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by James Bottomley

[SCSI] libsas: convert to use the data buffer accessors

- convert to use the new accessors for the sg lists and the
parameters.
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: default avatarDarrick J. Wong <djwong@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 41ce639a
...@@ -76,8 +76,8 @@ static void sas_scsi_task_done(struct sas_task *task) ...@@ -76,8 +76,8 @@ static void sas_scsi_task_done(struct sas_task *task)
hs = DID_NO_CONNECT; hs = DID_NO_CONNECT;
break; break;
case SAS_DATA_UNDERRUN: case SAS_DATA_UNDERRUN:
sc->resid = ts->residual; scsi_set_resid(sc, ts->residual);
if (sc->request_bufflen - sc->resid < sc->underflow) if (scsi_bufflen(sc) - scsi_get_resid(sc) < sc->underflow)
hs = DID_ERROR; hs = DID_ERROR;
break; break;
case SAS_DATA_OVERRUN: case SAS_DATA_OVERRUN:
...@@ -161,9 +161,9 @@ static struct sas_task *sas_create_task(struct scsi_cmnd *cmd, ...@@ -161,9 +161,9 @@ static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
task->ssp_task.task_attr = sas_scsi_get_task_attr(cmd); task->ssp_task.task_attr = sas_scsi_get_task_attr(cmd);
memcpy(task->ssp_task.cdb, cmd->cmnd, 16); memcpy(task->ssp_task.cdb, cmd->cmnd, 16);
task->scatter = cmd->request_buffer; task->scatter = scsi_sglist(cmd);
task->num_scatter = cmd->use_sg; task->num_scatter = scsi_sg_count(cmd);
task->total_xfer_len = cmd->request_bufflen; task->total_xfer_len = scsi_bufflen(cmd);
task->data_dir = cmd->sc_data_direction; task->data_dir = cmd->sc_data_direction;
task->task_done = sas_scsi_task_done; task->task_done = sas_scsi_task_done;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment