diff --git a/[refs] b/[refs] index b054b57fd256..d63d1afbb822 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ff7b05f29fd4db810021d905e2dad95ab4fe2984 +refs/heads/master: 6bc711f6bd9dd393e1f9bbae354906affcd02aa5 diff --git a/trunk/drivers/dma/dw_dmac.c b/trunk/drivers/dma/dw_dmac.c index 5d7b199208d9..9f4310f013f5 100644 --- a/trunk/drivers/dma/dw_dmac.c +++ b/trunk/drivers/dma/dw_dmac.c @@ -749,8 +749,14 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, mem = sg_phys(sg); len = sg_dma_len(sg); - mem_width = 2; - if (unlikely(mem & 3 || len & 3)) + + if (!((mem | len) & 7)) + mem_width = 3; + else if (!((mem | len) & 3)) + mem_width = 2; + else if (!((mem | len) & 1)) + mem_width = 1; + else mem_width = 0; slave_sg_todev_fill_desc: @@ -807,8 +813,14 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, mem = sg_phys(sg); len = sg_dma_len(sg); - mem_width = 2; - if (unlikely(mem & 3 || len & 3)) + + if (!((mem | len) & 7)) + mem_width = 3; + else if (!((mem | len) & 3)) + mem_width = 2; + else if (!((mem | len) & 1)) + mem_width = 1; + else mem_width = 0; slave_sg_fromdev_fill_desc: