diff options
Diffstat (limited to 'drivers/scsi/wd33c93.c')
-rw-r--r-- | drivers/scsi/wd33c93.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index 0e8e642fd3b0..fdbb92d1f722 100644 --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c | |||
@@ -410,8 +410,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd, | |||
410 | if (cmd->use_sg) { | 410 | if (cmd->use_sg) { |
411 | cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; | 411 | cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer; |
412 | cmd->SCp.buffers_residual = cmd->use_sg - 1; | 412 | cmd->SCp.buffers_residual = cmd->use_sg - 1; |
413 | cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) + | 413 | cmd->SCp.ptr = sg_virt(cmd->SCp.buffer); |
414 | cmd->SCp.buffer->offset; | ||
415 | cmd->SCp.this_residual = cmd->SCp.buffer->length; | 414 | cmd->SCp.this_residual = cmd->SCp.buffer->length; |
416 | } else { | 415 | } else { |
417 | cmd->SCp.buffer = NULL; | 416 | cmd->SCp.buffer = NULL; |
@@ -745,8 +744,7 @@ transfer_bytes(const wd33c93_regs regs, struct scsi_cmnd *cmd, | |||
745 | ++cmd->SCp.buffer; | 744 | ++cmd->SCp.buffer; |
746 | --cmd->SCp.buffers_residual; | 745 | --cmd->SCp.buffers_residual; |
747 | cmd->SCp.this_residual = cmd->SCp.buffer->length; | 746 | cmd->SCp.this_residual = cmd->SCp.buffer->length; |
748 | cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) + | 747 | cmd->SCp.ptr = sg_virt(cmd->SCp.buffer); |
749 | cmd->SCp.buffer->offset; | ||
750 | } | 748 | } |
751 | if (!cmd->SCp.this_residual) /* avoid bogus setups */ | 749 | if (!cmd->SCp.this_residual) /* avoid bogus setups */ |
752 | return; | 750 | return; |