diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2007-05-25 15:51:32 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-06-17 19:36:24 -0400 |
commit | 4c2baaaf2ba4875d1d2d59b3b3e1216d3277b17a (patch) | |
tree | 2023b05bebd9f4bddb354304c011e2dbaed31f89 /drivers/scsi | |
parent | f98754960a9b25057ad5f249f877b3d6fab889ce (diff) |
[SCSI] esp_scsi: convert to use the data buffer accessors
- convert to use the new accessors for the sg lists and the
parameters.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/esp_scsi.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 2321f3db4623..c1d50e669c43 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c | |||
@@ -324,17 +324,14 @@ static void esp_reset_esp(struct esp *esp) | |||
324 | static void esp_map_dma(struct esp *esp, struct scsi_cmnd *cmd) | 324 | static void esp_map_dma(struct esp *esp, struct scsi_cmnd *cmd) |
325 | { | 325 | { |
326 | struct esp_cmd_priv *spriv = ESP_CMD_PRIV(cmd); | 326 | struct esp_cmd_priv *spriv = ESP_CMD_PRIV(cmd); |
327 | struct scatterlist *sg = cmd->request_buffer; | 327 | struct scatterlist *sg = scsi_sglist(cmd); |
328 | int dir = cmd->sc_data_direction; | 328 | int dir = cmd->sc_data_direction; |
329 | int total, i; | 329 | int total, i; |
330 | 330 | ||
331 | if (dir == DMA_NONE) | 331 | if (dir == DMA_NONE) |
332 | return; | 332 | return; |
333 | 333 | ||
334 | BUG_ON(cmd->use_sg == 0); | 334 | spriv->u.num_sg = esp->ops->map_sg(esp, sg, scsi_sg_count(cmd), dir); |
335 | |||
336 | spriv->u.num_sg = esp->ops->map_sg(esp, sg, | ||
337 | cmd->use_sg, dir); | ||
338 | spriv->cur_residue = sg_dma_len(sg); | 335 | spriv->cur_residue = sg_dma_len(sg); |
339 | spriv->cur_sg = sg; | 336 | spriv->cur_sg = sg; |
340 | 337 | ||
@@ -407,8 +404,7 @@ static void esp_unmap_dma(struct esp *esp, struct scsi_cmnd *cmd) | |||
407 | if (dir == DMA_NONE) | 404 | if (dir == DMA_NONE) |
408 | return; | 405 | return; |
409 | 406 | ||
410 | esp->ops->unmap_sg(esp, cmd->request_buffer, | 407 | esp->ops->unmap_sg(esp, scsi_sglist(cmd), spriv->u.num_sg, dir); |
411 | spriv->u.num_sg, dir); | ||
412 | } | 408 | } |
413 | 409 | ||
414 | static void esp_save_pointers(struct esp *esp, struct esp_cmd_entry *ent) | 410 | static void esp_save_pointers(struct esp *esp, struct esp_cmd_entry *ent) |