diff options
Diffstat (limited to 'drivers/scsi/initio.c')
-rw-r--r-- | drivers/scsi/initio.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 0cc8868ea35d..dbae3fdb8506 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c | |||
@@ -2581,8 +2581,8 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c | |||
2581 | /* Map the sense buffer into bus memory */ | 2581 | /* Map the sense buffer into bus memory */ |
2582 | dma_addr = dma_map_single(&host->pci_dev->dev, cmnd->sense_buffer, | 2582 | dma_addr = dma_map_single(&host->pci_dev->dev, cmnd->sense_buffer, |
2583 | SENSE_SIZE, DMA_FROM_DEVICE); | 2583 | SENSE_SIZE, DMA_FROM_DEVICE); |
2584 | cblk->senseptr = cpu_to_le32((u32)dma_addr); | 2584 | cblk->senseptr = (u32)dma_addr; |
2585 | cblk->senselen = cpu_to_le32(SENSE_SIZE); | 2585 | cblk->senselen = SENSE_SIZE; |
2586 | cmnd->SCp.ptr = (char *)(unsigned long)dma_addr; | 2586 | cmnd->SCp.ptr = (char *)(unsigned long)dma_addr; |
2587 | cblk->cdblen = cmnd->cmd_len; | 2587 | cblk->cdblen = cmnd->cmd_len; |
2588 | 2588 | ||
@@ -2606,7 +2606,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c | |||
2606 | dma_addr = dma_map_single(&host->pci_dev->dev, &cblk->sglist[0], | 2606 | dma_addr = dma_map_single(&host->pci_dev->dev, &cblk->sglist[0], |
2607 | sizeof(struct sg_entry) * TOTAL_SG_ENTRY, | 2607 | sizeof(struct sg_entry) * TOTAL_SG_ENTRY, |
2608 | DMA_BIDIRECTIONAL); | 2608 | DMA_BIDIRECTIONAL); |
2609 | cblk->bufptr = cpu_to_le32((u32)dma_addr); | 2609 | cblk->bufptr = (u32)dma_addr; |
2610 | cmnd->SCp.dma_handle = dma_addr; | 2610 | cmnd->SCp.dma_handle = dma_addr; |
2611 | 2611 | ||
2612 | cblk->sglen = nseg; | 2612 | cblk->sglen = nseg; |
@@ -2616,7 +2616,8 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c | |||
2616 | sg = &cblk->sglist[0]; | 2616 | sg = &cblk->sglist[0]; |
2617 | scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { | 2617 | scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { |
2618 | sg->data = cpu_to_le32((u32)sg_dma_address(sglist)); | 2618 | sg->data = cpu_to_le32((u32)sg_dma_address(sglist)); |
2619 | total_len += sg->len = cpu_to_le32((u32)sg_dma_len(sglist)); | 2619 | sg->len = cpu_to_le32((u32)sg_dma_len(sglist)); |
2620 | total_len += sg_dma_len(sglist); | ||
2620 | ++sg; | 2621 | ++sg; |
2621 | } | 2622 | } |
2622 | 2623 | ||