aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_scsi_host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libsas/sas_scsi_host.c')
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c10
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;