diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2007-09-09 21:59:32 +0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-12 03:22:35 +0300 |
commit | cc0455fac06f0539277d7b724dbc513284629069 (patch) | |
tree | 7ffb27d55bb508cc02fec80164dea6f86bc90b10 /drivers/scsi/a3000.c | |
parent | f2c1afa5ebc6cd3171539e686b48a2afe24694c0 (diff) | |
download | linux-cc0455fac06f0539277d7b724dbc513284629069.tar.xz |
[SCSI] a3000: convert to accessors and !use_sg cleanup
- convert to accessors and !use_sg cleanup
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/a3000.c')
-rw-r--r-- | drivers/scsi/a3000.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c index 796f1c4d772e..d7255c8bf281 100644 --- a/drivers/scsi/a3000.c +++ b/drivers/scsi/a3000.c @@ -70,12 +70,8 @@ static int dma_setup(struct scsi_cmnd *cmd, int dir_in) if (!dir_in) { /* copy to bounce buffer for a write */ - if (cmd->use_sg) { - memcpy (HDATA(a3000_host)->dma_bounce_buffer, - cmd->SCp.ptr, cmd->SCp.this_residual); - } else - memcpy (HDATA(a3000_host)->dma_bounce_buffer, - cmd->request_buffer, cmd->request_bufflen); + memcpy (HDATA(a3000_host)->dma_bounce_buffer, + cmd->SCp.ptr, cmd->SCp.this_residual); } addr = virt_to_bus(HDATA(a3000_host)->dma_bounce_buffer); @@ -146,7 +142,7 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt, /* copy from a bounce buffer, if necessary */ if (status && HDATA(instance)->dma_bounce_buffer) { - if (SCpnt && SCpnt->use_sg) { + if (SCpnt) { if (HDATA(instance)->dma_dir && SCpnt) memcpy (SCpnt->SCp.ptr, HDATA(instance)->dma_bounce_buffer, @@ -155,11 +151,6 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt, HDATA(instance)->dma_bounce_buffer = NULL; HDATA(instance)->dma_bounce_len = 0; } else { - if (HDATA(instance)->dma_dir && SCpnt) - memcpy (SCpnt->request_buffer, - HDATA(instance)->dma_bounce_buffer, - SCpnt->request_bufflen); - kfree (HDATA(instance)->dma_bounce_buffer); HDATA(instance)->dma_bounce_buffer = NULL; HDATA(instance)->dma_bounce_len = 0; |