diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2007-05-25 13:46:37 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-29 13:50:54 -0400 |
commit | c13e5566471d90ff2858f5cacaf27021d158e037 (patch) | |
tree | 5d46182f4e6ed5c9171e301466239d67aa9daffe | |
parent | 41ce639a1c50cb936f058f52f99f65740e3f550e (diff) |
[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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index b4b52694497c..d70ddfda93fc 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -76,8 +76,8 @@ static void sas_scsi_task_done(struct sas_task *task) | |||
76 | hs = DID_NO_CONNECT; | 76 | hs = DID_NO_CONNECT; |
77 | break; | 77 | break; |
78 | case SAS_DATA_UNDERRUN: | 78 | case SAS_DATA_UNDERRUN: |
79 | sc->resid = ts->residual; | 79 | scsi_set_resid(sc, ts->residual); |
80 | if (sc->request_bufflen - sc->resid < sc->underflow) | 80 | if (scsi_bufflen(sc) - scsi_get_resid(sc) < sc->underflow) |
81 | hs = DID_ERROR; | 81 | hs = DID_ERROR; |
82 | break; | 82 | break; |
83 | case SAS_DATA_OVERRUN: | 83 | case SAS_DATA_OVERRUN: |
@@ -161,9 +161,9 @@ static struct sas_task *sas_create_task(struct scsi_cmnd *cmd, | |||
161 | task->ssp_task.task_attr = sas_scsi_get_task_attr(cmd); | 161 | task->ssp_task.task_attr = sas_scsi_get_task_attr(cmd); |
162 | memcpy(task->ssp_task.cdb, cmd->cmnd, 16); | 162 | memcpy(task->ssp_task.cdb, cmd->cmnd, 16); |
163 | 163 | ||
164 | task->scatter = cmd->request_buffer; | 164 | task->scatter = scsi_sglist(cmd); |
165 | task->num_scatter = cmd->use_sg; | 165 | task->num_scatter = scsi_sg_count(cmd); |
166 | task->total_xfer_len = cmd->request_bufflen; | 166 | task->total_xfer_len = scsi_bufflen(cmd); |
167 | task->data_dir = cmd->sc_data_direction; | 167 | task->data_dir = cmd->sc_data_direction; |
168 | 168 | ||
169 | task->task_done = sas_scsi_task_done; | 169 | task->task_done = sas_scsi_task_done; |