diff --git a/drivers/net/ethernet/lantiq/ppv4/bm/pp_bm_drv.c b/drivers/net/ethernet/lantiq/ppv4/bm/pp_bm_drv.c index 54aa4426b3bd227afa53d1c9b2ed7b265ac25bac..a0b4134a2578f08766ff69d6afe95593b6acb4e9 100644 --- a/drivers/net/ethernet/lantiq/ppv4/bm/pp_bm_drv.c +++ b/drivers/net/ethernet/lantiq/ppv4/bm/pp_bm_drv.c @@ -1578,7 +1578,7 @@ s32 bmgr_pop_buffer(struct bmgr_buff_info * const buff_info) copy_dma(address, (u32)dma, (0x80100000 | (8 * buff_info->num_allocs))); - for (index = 0; index < 2 * buff_info->num_allocs; index += 2) { + for (index = 0; index < buff_info->num_allocs; index++) { low = RD_REG_32(addr + offset); high = RD_REG_32(addr + offset + 4); offset += 8; @@ -1627,7 +1627,6 @@ EXPORT_SYMBOL(bmgr_pop_buffer); s32 bmgr_push_buffer(struct bmgr_buff_info * const buff_info) { u32 address = BMGR_DATAPATH_BASE; - //u32 src_addr = 0x600000; u32 value = 0; u32 index = 0; u32 ptr2push[2 * PP_BMGR_MAX_BURST_IN_POP]; // 64 bit per allocation @@ -1651,13 +1650,11 @@ s32 bmgr_push_buffer(struct bmgr_buff_info * const buff_info) address |= (buff_info->policy_id << 8); // write to ddr - for (index = 0; index < 2 * buff_info->num_allocs; index += 2) { - ptr2push[index] = buff_info->addr_low[index]; - //WR_DDR32(src_addr+8*index, buff_info->addr_low[index]); + for (index = 0; index < buff_info->num_allocs; index++) { + ptr2push[2*index] = buff_info->addr_low[index]; value = (buff_info->addr_high[index] & 0xF) | ((buff_info->pool_id[index] & 0xFF) << 24); - ptr2push[index + 1] = value; - //WR_DDR32(src_addr + 4 + 8 * index, value); + ptr2push[2*index + 1] = value; pr_info("bmgr_push_buffer: <--- push buffer to address %p (pool %d, addr low %p, addr high %p, value %d)\n", (void *)address, buff_info->pool_id[index], @@ -1668,7 +1665,7 @@ s32 bmgr_push_buffer(struct bmgr_buff_info * const buff_info) num_deallocated_buffers++; } - copy_dma((u32)&ptr2push[0]/*src_addr*/, address, + copy_dma((u32)&ptr2push[0], address, (0x80100000 | (8 * buff_info->num_allocs))/*0x80100008*/); this->driver_db.policies[buff_info->policy_id].