diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/mvneta.c | 2 | ||||
-rw-r--r-- | drivers/net/zynq_gem.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 45e5eda955..ab697b9bc7 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -1702,11 +1702,13 @@ static int mvneta_probe(struct udevice *dev) /* Align buffer area for descs and rx_buffers to 1MiB */ bd_space = memalign(1 << MMU_SECTION_SHIFT, BD_SPACE); + flush_dcache_range((ulong)bd_space, (ulong)bd_space + BD_SPACE); mmu_set_region_dcache_behaviour((phys_addr_t)bd_space, BD_SPACE, DCACHE_OFF); buffer_loc.tx_descs = (struct mvneta_tx_desc *)bd_space; size = roundup(MVNETA_MAX_TXD * sizeof(struct mvneta_tx_desc), ARCH_DMA_MINALIGN); + memset(buffer_loc.tx_descs, 0, size); buffer_loc.rx_descs = (struct mvneta_rx_desc *) ((phys_addr_t)bd_space + size); size += roundup(MVNETA_MAX_RXD * sizeof(struct mvneta_rx_desc), diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index a817f2e5d6..d1138fe090 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -609,7 +609,7 @@ static int zynq_gem_miiphy_read(struct mii_dev *bus, int addr, { struct zynq_gem_priv *priv = bus->priv; int ret; - u16 val; + u16 val = 0; ret = phyread(priv, addr, reg, &val); debug("%s 0x%x, 0x%x, 0x%x, 0x%x\n", __func__, addr, reg, val, ret); |