Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89669
b: refs/heads/master
c: 647b242
h: refs/heads/master
i:
  89667: 3a48dbc
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Apr 7, 2008
1 parent 4e87989 commit d402a8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: ed5f606fef22e515331aab4c1f927775cf4af70e
refs/heads/master: 647b24256241e144fe8369244da1730b577211e9
10 changes: 7 additions & 3 deletions trunk/drivers/scsi/aic7xxx/aic7xxx_osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,12 +1398,18 @@ ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev,
return SCSI_MLQUEUE_DEVICE_BUSY;
}

nseg = scsi_dma_map(cmd);
if (nseg < 0)
return SCSI_MLQUEUE_HOST_BUSY;

/*
* Get an scb to use.
*/
scb = ahc_get_scb(ahc);
if (!scb)
if (!scb) {
scsi_dma_unmap(cmd);
return SCSI_MLQUEUE_HOST_BUSY;
}

scb->io_ctx = cmd;
scb->platform_data->dev = dev;
Expand Down Expand Up @@ -1464,8 +1470,6 @@ ahc_linux_run_command(struct ahc_softc *ahc, struct ahc_linux_device *dev,
ahc_set_sense_residual(scb, 0);
scb->sg_count = 0;

nseg = scsi_dma_map(cmd);
BUG_ON(nseg < 0);
if (nseg > 0) {
struct ahc_dma_seg *sg;
struct scatterlist *cur_seg;
Expand Down

0 comments on commit d402a8f

Please sign in to comment.