summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2006-01-03 12:51:07 +0000
committerAnton Altaparmakov <aia21@cantab.net>2006-01-03 12:51:07 +0000
commitd087e4bdd24ebe3ae3d0b265b6573ec901af4b4b (patch)
treec2db1b4958bbf617a25398b7ef93d82006b26a17 /drivers/scsi/st.c
parent292d4ed32e35df4755052b5002e533348d1648fd (diff)
parent88026842b0a760145aa71d69e74fbc9ec118ca44 (diff)
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r--drivers/scsi/st.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 7ac6ea141ff..dd592f6a252 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4194,27 +4194,10 @@ static void st_intr(struct scsi_cmnd *SCpnt)
*/
static int st_init_command(struct scsi_cmnd *SCpnt)
{
- struct request *rq;
-
if (!(SCpnt->request->flags & REQ_BLOCK_PC))
return 0;
- rq = SCpnt->request;
- if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd))
- return 0;
-
- memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd));
- SCpnt->cmd_len = rq->cmd_len;
-
- if (rq_data_dir(rq) == WRITE)
- SCpnt->sc_data_direction = DMA_TO_DEVICE;
- else if (rq->data_len)
- SCpnt->sc_data_direction = DMA_FROM_DEVICE;
- else
- SCpnt->sc_data_direction = DMA_NONE;
-
- SCpnt->timeout_per_command = rq->timeout;
- SCpnt->transfersize = rq->data_len;
+ scsi_setup_blk_pc_cmnd(SCpnt, 0);
SCpnt->done = st_intr;
return 1;
}