diff options
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 9018ee851a8a..73270ff892d9 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -5142,6 +5142,7 @@ static void ipr_build_ata_ioadl(struct ipr_cmnd *ipr_cmd, | |||
5142 | struct ipr_ioadl_desc *last_ioadl = NULL; | 5142 | struct ipr_ioadl_desc *last_ioadl = NULL; |
5143 | int len = qc->nbytes + qc->pad_len; | 5143 | int len = qc->nbytes + qc->pad_len; |
5144 | struct scatterlist *sg; | 5144 | struct scatterlist *sg; |
5145 | unsigned int si; | ||
5145 | 5146 | ||
5146 | if (len == 0) | 5147 | if (len == 0) |
5147 | return; | 5148 | return; |
@@ -5159,7 +5160,7 @@ static void ipr_build_ata_ioadl(struct ipr_cmnd *ipr_cmd, | |||
5159 | cpu_to_be32(sizeof(struct ipr_ioadl_desc) * ipr_cmd->dma_use_sg); | 5160 | cpu_to_be32(sizeof(struct ipr_ioadl_desc) * ipr_cmd->dma_use_sg); |
5160 | } | 5161 | } |
5161 | 5162 | ||
5162 | ata_for_each_sg(sg, qc) { | 5163 | for_each_sg(qc->sg, sg, qc->n_elem, si) { |
5163 | ioadl->flags_and_data_len = cpu_to_be32(ioadl_flags | sg_dma_len(sg)); | 5164 | ioadl->flags_and_data_len = cpu_to_be32(ioadl_flags | sg_dma_len(sg)); |
5164 | ioadl->address = cpu_to_be32(sg_dma_address(sg)); | 5165 | ioadl->address = cpu_to_be32(sg_dma_address(sg)); |
5165 | 5166 | ||
@@ -5222,12 +5223,12 @@ static unsigned int ipr_qc_issue(struct ata_queued_cmd *qc) | |||
5222 | regs->flags |= IPR_ATA_FLAG_XFER_TYPE_DMA; | 5223 | regs->flags |= IPR_ATA_FLAG_XFER_TYPE_DMA; |
5223 | break; | 5224 | break; |
5224 | 5225 | ||
5225 | case ATA_PROT_ATAPI: | 5226 | case ATAPI_PROT_PIO: |
5226 | case ATA_PROT_ATAPI_NODATA: | 5227 | case ATAPI_PROT_NODATA: |
5227 | regs->flags |= IPR_ATA_FLAG_PACKET_CMD; | 5228 | regs->flags |= IPR_ATA_FLAG_PACKET_CMD; |
5228 | break; | 5229 | break; |
5229 | 5230 | ||
5230 | case ATA_PROT_ATAPI_DMA: | 5231 | case ATAPI_PROT_DMA: |
5231 | regs->flags |= IPR_ATA_FLAG_PACKET_CMD; | 5232 | regs->flags |= IPR_ATA_FLAG_PACKET_CMD; |
5232 | regs->flags |= IPR_ATA_FLAG_XFER_TYPE_DMA; | 5233 | regs->flags |= IPR_ATA_FLAG_XFER_TYPE_DMA; |
5233 | break; | 5234 | break; |