When refactoring the function msdc_init_gpd_bd, an error in the
calculation of the bd.next address was introduced. The offset has to
be added to the base address, not multiplied.
Fixes:
8f2395586cf0 ("staging: mt7621-mmc: Refactor msdc_init_gpd_bd")
Reported-by: NeilBrown <neil@brown.name>
Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Tested-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
memset(bd, 0, sizeof(struct bd) * MAX_BD_NUM);
for (i = 0; i < (MAX_BD_NUM - 1); i++)
- bd[i].next = (void *)(dma->bd_addr * sizeof(*bd) * (i + 1));
+ bd[i].next = (void *)(dma->bd_addr + sizeof(*bd) * (i + 1));
}
static int msdc_drv_probe(struct platform_device *pdev)