From: Paul Burton Date: Sun, 30 Apr 2017 19:57:06 +0000 (+0200) Subject: net: pch_gbe: Fix rx descriptor buffer addresses X-Git-Tag: v2017.07-rc1~87^2~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=db225f1131ad97fdf9a5df3b8d8e013284827c5a;p=oweals%2Fu-boot.git net: pch_gbe: Fix rx descriptor buffer addresses The loop to set up buffer addresses in rx descriptors always operated on descriptor 0, rather than on each descriptor sequentially. Fix this in order to setup correct buffer addresses for each descriptor. Signed-off-by: Paul Burton Signed-off-by: Daniel Schwierzeck Reviewed-by: Bin Meng Tested-by: Bin Meng Reviewed-by: Simon Glass Acked-by: Joe Hershberger --- diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c index 4aac0f67a0..7d15616356 100644 --- a/drivers/net/pch_gbe.c +++ b/drivers/net/pch_gbe.c @@ -117,8 +117,8 @@ static void pch_gbe_rx_descs_init(struct udevice *dev) memset(rx_desc, 0, sizeof(struct pch_gbe_rx_desc) * PCH_GBE_DESC_NUM); for (i = 0; i < PCH_GBE_DESC_NUM; i++) - rx_desc->buffer_addr = dm_pci_phys_to_mem(priv->dev, - (ulong)(priv->rx_buff[i])); + rx_desc[i].buffer_addr = dm_pci_phys_to_mem(priv->dev, + priv->rx_buff[i]); writel(dm_pci_phys_to_mem(priv->dev, (ulong)rx_desc), &mac_regs->rx_dsc_base);