Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101418
b: refs/heads/master
c: 3a628b0
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and Linus Torvalds committed Jul 15, 2008
1 parent 3928554 commit 27fef49
Show file tree
Hide file tree
Showing 2 changed files with 9 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: a5db33411ae762e597bfcde6bb9d0c8c2ea9c0eb
refs/heads/master: 3a628b0fd42f7eaf9d052447784d48ceae9ffb8e
11 changes: 8 additions & 3 deletions trunk/drivers/scsi/a100u2w.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ static irqreturn_t orc_interrupt(struct orc_host * host)
* Build a host adapter control block from the SCSI mid layer command
*/

static void inia100_build_scb(struct orc_host * host, struct orc_scb * scb, struct scsi_cmnd * cmd)
static int inia100_build_scb(struct orc_host * host, struct orc_scb * scb, struct scsi_cmnd * cmd)
{ /* Create corresponding SCB */
struct scatterlist *sg;
struct orc_sgent *sgent; /* Pointer to SG list */
Expand All @@ -865,7 +865,8 @@ static void inia100_build_scb(struct orc_host * host, struct orc_scb * scb, stru
sgent = (struct orc_sgent *) & escb->sglist[0];

count_sg = scsi_dma_map(cmd);
BUG_ON(count_sg < 0);
if (count_sg < 0)
return count_sg;
BUG_ON(count_sg > TOTAL_SG_ENTRY);

/* Build the scatter gather lists */
Expand Down Expand Up @@ -898,6 +899,7 @@ static void inia100_build_scb(struct orc_host * host, struct orc_scb * scb, stru
scb->tag_msg = 0; /* No tag support */
}
memcpy(scb->cdb, cmd->cmnd, scb->cdb_len);
return 0;
}

/**
Expand All @@ -921,7 +923,10 @@ static int inia100_queue(struct scsi_cmnd * cmd, void (*done) (struct scsi_cmnd
if ((scb = orc_alloc_scb(host)) == NULL)
return SCSI_MLQUEUE_HOST_BUSY;

inia100_build_scb(host, scb, cmd);
if (inia100_build_scb(host, scb, cmd)) {
orc_release_scb(host, scb);
return SCSI_MLQUEUE_HOST_BUSY;
}
orc_exec_scb(host, scb); /* Start execute SCB */
return 0;
}
Expand Down

0 comments on commit 27fef49

Please sign in to comment.