usb: isp1760: fix memory pool initialization
The loops to setup the memory pool were skipping some blocks, that was not visible on the ISP1763 because it has fewer blocks than the ISP1761. But won testing on that IP from the family that would be an issue. Reported-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Link: https://lore.kernel.org/r/20210827131154.4151862-2-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
f73800a905
Коммит
f757f9291f
|
@ -588,8 +588,8 @@ static void init_memory(struct isp1760_hcd *priv)
|
|||
|
||||
payload_addr = PAYLOAD_OFFSET;
|
||||
|
||||
for (i = 0, curr = 0; i < ARRAY_SIZE(mem->blocks); i++) {
|
||||
for (j = 0; j < mem->blocks[i]; j++, curr++) {
|
||||
for (i = 0, curr = 0; i < ARRAY_SIZE(mem->blocks); i++, curr += j) {
|
||||
for (j = 0; j < mem->blocks[i]; j++) {
|
||||
priv->memory_pool[curr + j].start = payload_addr;
|
||||
priv->memory_pool[curr + j].size = mem->blocks_size[i];
|
||||
priv->memory_pool[curr + j].free = 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче