[U-Boot] [PATCH 11/23] net: pch_gbe: Fix rx descriptor buffer addresses

Bin Meng bmeng.cn at gmail.com
Tue Sep 27 09:14:10 CEST 2016


Hi Paul,

On Tue, Sep 27, 2016 at 2:29 AM, Paul Burton <paul.burton at imgtec.com> wrote:
> 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 at imgtec.com>
> ---
>
>  drivers/net/pch_gbe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c
> index 4aac0f6..e41d737 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_virt_to_mem(priv->dev,

The change from phys_to_men to virt_to_mem should be put in the
patch#12 of this series.

> +                       priv->rx_buff[i]);
>
>         writel(dm_pci_phys_to_mem(priv->dev, (ulong)rx_desc),
>                &mac_regs->rx_dsc_base);
> --

Other than that,

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

Tested on Crown Bay
Tested-by: Bin Meng <bmeng.cn at gmail.com>

Regards,
Bin


More information about the U-Boot mailing list