Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76986
b: refs/heads/master
c: f2c1afa
h: refs/heads/master
v: v3
  • Loading branch information
Boaz Harrosh authored and James Bottomley committed Jan 12, 2008
1 parent 95026b1 commit 8606167
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7410d849a47047f1299a505dd5fde68d0ed45eaa
refs/heads/master: f2c1afa5ebc6cd3171539e686b48a2afe24694c0
36 changes: 5 additions & 31 deletions trunk/drivers/scsi/a2091.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,9 @@ 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)
#if 0
panic ("scsi%ddma: incomplete s/g support",
instance->host_no);
#else
/* copy to bounce buffer for a write */
memcpy (HDATA(instance)->dma_bounce_buffer,
cmd->SCp.ptr, cmd->SCp.this_residual);
#endif
else
memcpy (HDATA(instance)->dma_bounce_buffer,
cmd->request_buffer, cmd->request_bufflen);
}
}

Expand Down Expand Up @@ -144,30 +135,13 @@ 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 0
panic ("scsi%d: incomplete s/g support",
instance->host_no);
#else
if( HDATA(instance)->dma_dir )
if( HDATA(instance)->dma_dir )
memcpy (SCpnt->SCp.ptr,
HDATA(instance)->dma_bounce_buffer,
SCpnt->SCp.this_residual);
kfree (HDATA(instance)->dma_bounce_buffer);
HDATA(instance)->dma_bounce_buffer = NULL;
HDATA(instance)->dma_bounce_len = 0;

#endif
} 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;
}
kfree (HDATA(instance)->dma_bounce_buffer);
HDATA(instance)->dma_bounce_buffer = NULL;
HDATA(instance)->dma_bounce_len = 0;
}
}

Expand Down

0 comments on commit 8606167

Please sign in to comment.