diff options
Diffstat (limited to 'drivers/ata/sata_sil24.c')
-rw-r--r-- | drivers/ata/sata_sil24.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index fdd3ceac329b..b4b1f91ea693 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -813,8 +813,9 @@ static inline void sil24_fill_sg(struct ata_queued_cmd *qc, | |||
813 | { | 813 | { |
814 | struct scatterlist *sg; | 814 | struct scatterlist *sg; |
815 | struct sil24_sge *last_sge = NULL; | 815 | struct sil24_sge *last_sge = NULL; |
816 | unsigned int si; | ||
816 | 817 | ||
817 | ata_for_each_sg(sg, qc) { | 818 | for_each_sg(qc->sg, sg, qc->n_elem, si) { |
818 | sge->addr = cpu_to_le64(sg_dma_address(sg)); | 819 | sge->addr = cpu_to_le64(sg_dma_address(sg)); |
819 | sge->cnt = cpu_to_le32(sg_dma_len(sg)); | 820 | sge->cnt = cpu_to_le32(sg_dma_len(sg)); |
820 | sge->flags = 0; | 821 | sge->flags = 0; |
@@ -823,8 +824,7 @@ static inline void sil24_fill_sg(struct ata_queued_cmd *qc, | |||
823 | sge++; | 824 | sge++; |
824 | } | 825 | } |
825 | 826 | ||
826 | if (likely(last_sge)) | 827 | last_sge->flags = cpu_to_le32(SGE_TRM); |
827 | last_sge->flags = cpu_to_le32(SGE_TRM); | ||
828 | } | 828 | } |
829 | 829 | ||
830 | static int sil24_qc_defer(struct ata_queued_cmd *qc) | 830 | static int sil24_qc_defer(struct ata_queued_cmd *qc) |