Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43459
b: refs/heads/master
c: 58272c1
h: refs/heads/master
i:
  43457: 2aa1c37
  43455: 29dc026
v: v3
  • Loading branch information
Stefan Richter committed Dec 7, 2006
1 parent 030bfb3 commit 07335dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 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: 2a533b179dcfe941ccbe30344d14f39f6d7098ae
refs/heads/master: 58272c1c0330f5f899f130d45ce845ca085de044
30 changes: 7 additions & 23 deletions trunk/drivers/ieee1394/sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,18 +591,14 @@ static struct sbp2_command_info *sbp2util_allocate_command_orb(
return cmd;
}

static void sbp2util_free_command_dma(struct sbp2_command_info *cmd)
/*
* Unmaps the DMAs of a command and moves the command to the completed ORB list.
* Must be called with lu->cmd_orb_lock held.
*/
static void sbp2util_mark_command_completed(struct sbp2_lu *lu,
struct sbp2_command_info *cmd)
{
struct sbp2_lu *lu = (struct sbp2_lu *)
cmd->Current_SCpnt->device->host->hostdata[0];
struct hpsb_host *host;

if (!lu) {
SBP2_ERR("%s: lu == NULL", __FUNCTION__);
return;
}

host = lu->ud->ne->host;
struct hpsb_host *host = lu->ud->ne->host;

if (cmd->cmd_dma) {
if (cmd->dma_type == CMD_DMA_SINGLE)
Expand All @@ -615,23 +611,11 @@ static void sbp2util_free_command_dma(struct sbp2_command_info *cmd)
cmd->dma_type = CMD_DMA_NONE;
cmd->cmd_dma = 0;
}

if (cmd->sge_buffer) {
pci_unmap_sg(host->pdev, cmd->sge_buffer,
cmd->dma_size, cmd->dma_dir);
cmd->sge_buffer = NULL;
}
}

/*
* This function moves a command to the completed orb list.
* Must be called with lu->cmd_orb_lock held.
*/
static void sbp2util_mark_command_completed(
struct sbp2_lu *lu,
struct sbp2_command_info *cmd)
{
sbp2util_free_command_dma(cmd);
list_move_tail(&cmd->list, &lu->cmd_orb_completed);
}

Expand Down

0 comments on commit 07335dd

Please sign in to comment.