[U-Boot] [PATCH v2 2/2] net: fec_mxc: Do not error out when FEC_TBD_READY

Marek Vasut marex at denx.de
Thu Aug 21 05:53:26 CEST 2014


On Wednesday, August 20, 2014 at 11:24:36 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
> 
> Do not indicate an error when the buffer ready flag (FEC_TBD_READY) is set.
> 
> Without this change, mx6solox is not capable of doing TFTP transfers.
> 
> Succesfully tested on mx25, mx28, mx51, mx53, mx6q, mx6sl and mx6sx.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
> Changes since v1:
> - None
> 
>  drivers/net/fec_mxc.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
> index 1a5105e..2699f5a 100644
> --- a/drivers/net/fec_mxc.c
> +++ b/drivers/net/fec_mxc.c
> @@ -726,8 +726,6 @@ static int fec_send(struct eth_device *dev, void
> *packet, int length) ret = -EINVAL;
> 
>  	invalidate_dcache_range(addr, addr + size);
> -	if (readw(&fec->tbd_base[fec->tbd_index].status) & FEC_TBD_READY)
> -		ret = -EINVAL;

Uh, this means that if the buffer didn't complete for whatever reason, you will 
happily proceed and claim that this buffer you sent is really sent. You will 
never figure out that you need to re-send it. Sorry, but such a change cannot be
applied, since that just allows errors to creep in. Is there a bug in the MX6SX
or something so that it doesn't set this bit ?

Best regards,
Marek Vasut


More information about the U-Boot mailing list