summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2005-12-09 17:45:22 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-12-13 21:29:27 -0800
commitc9526497cf03ee775c3a6f8ba62335735f98de7a (patch)
tree46619a6e57ca84b51fed852722114c2fd25a9289 /drivers/scsi/st.c
parent322e079f1b606e46b79bb8b8e6cf6110b5f2aa3f (diff)
downloadop-kernel-dev-c9526497cf03ee775c3a6f8ba62335735f98de7a.zip
op-kernel-dev-c9526497cf03ee775c3a6f8ba62335735f98de7a.tar.gz
[SCSI] Consolidate REQ_BLOCK_PC handling path (fix ipod panic)
This follows on from Jens' patch and consolidates all of the ULD separate handlers for REQ_BLOCK_PC into a single call which has his fix for our direction bug. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
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 7ac6ea1..dd592f6 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;
}
OpenPOWER on IntegriCloud