Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190123
b: refs/heads/master
c: a71fa1f
h: refs/heads/master
i:
  190121: d184f42
  190119: a7aad2b
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Apr 11, 2010
1 parent 3489529 commit 8d00e2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 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: a8f23b03535359c5afeb77d937b89b8a4d87b2b2
refs/heads/master: a71fa1fc43a29133f13ae6ada1a389ca298c0934
29 changes: 2 additions & 27 deletions trunk/drivers/scsi/ibmvscsi/ibmvscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,16 +323,6 @@ static void set_srp_direction(struct scsi_cmnd *cmd,
srp_cmd->buf_fmt = fmt;
}

static void unmap_sg_list(int num_entries,
struct device *dev,
struct srp_direct_buf *md)
{
int i;

for (i = 0; i < num_entries; ++i)
dma_unmap_single(dev, md[i].va, md[i].len, DMA_BIDIRECTIONAL);
}

/**
* unmap_cmd_data: - Unmap data pointed in srp_cmd based on the format
* @cmd: srp_cmd whose additional_data member will be unmapped
Expand All @@ -350,24 +340,9 @@ static void unmap_cmd_data(struct srp_cmd *cmd,

if (out_fmt == SRP_NO_DATA_DESC && in_fmt == SRP_NO_DATA_DESC)
return;
else if (out_fmt == SRP_DATA_DESC_DIRECT ||
in_fmt == SRP_DATA_DESC_DIRECT) {
struct srp_direct_buf *data =
(struct srp_direct_buf *) cmd->add_data;
dma_unmap_single(dev, data->va, data->len, DMA_BIDIRECTIONAL);
} else {
struct srp_indirect_buf *indirect =
(struct srp_indirect_buf *) cmd->add_data;
int num_mapped = indirect->table_desc.len /
sizeof(struct srp_direct_buf);

if (num_mapped <= MAX_INDIRECT_BUFS) {
unmap_sg_list(num_mapped, dev, &indirect->desc_list[0]);
return;
}

unmap_sg_list(num_mapped, dev, evt_struct->ext_list);
}
if (evt_struct->cmnd)
scsi_dma_unmap(evt_struct->cmnd);
}

static int map_sg_list(struct scsi_cmnd *cmd, int nseg,
Expand Down

0 comments on commit 8d00e2f

Please sign in to comment.