Преглед на файлове

dmaengine: fsl-edma: fix calculation of remaining bytes

If the current transfer control descriptor (TCD) was not yet started,
the address will be the same as the initial address. Hence test if the
current address is less than or equal to the start address of each TCD.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Stefan Agner преди 10 години
родител
ревизия
6ab55b214c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      drivers/dma/fsl-edma.c

+ 1 - 1
drivers/dma/fsl-edma.c

@@ -386,7 +386,7 @@ static size_t fsl_edma_desc_residue(struct fsl_edma_chan *fsl_chan,
 					&(edesc->tcd[i].vtcd->daddr));
 					&(edesc->tcd[i].vtcd->daddr));
 
 
 		len -= size;
 		len -= size;
-		if (cur_addr > dma_addr && cur_addr < dma_addr + size) {
+		if (cur_addr >= dma_addr && cur_addr < dma_addr + size) {
 			len += dma_addr + size - cur_addr;
 			len += dma_addr + size - cur_addr;
 			break;
 			break;
 		}
 		}