summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-04-30 19:57:06 (GMT)
committerJoe Hershberger <joe.hershberger@ni.com>2017-06-02 19:44:20 (GMT)
commitdb225f1131ad97fdf9a5df3b8d8e013284827c5a (patch)
tree6a2910ae5576cb446300bdb857711577e4d527a5
parent43979cbacb81a3211ea41d890152ec090578d37f (diff)
downloadu-boot-fsl-qoriq-db225f1131ad97fdf9a5df3b8d8e013284827c5a.tar.xz
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 <paul.burton@imgtec.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--drivers/net/pch_gbe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c
index 4aac0f6..7d15616 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);