[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAObsKAB81s-2NS3ZGQsJ7RDnKAhgQApmD2Jnk1nNfzucMvTpw@mail.gmail.com>
Date: Fri, 18 Mar 2016 15:07:26 +0100
From: Tomeu Vizoso <tomeu@...euvizoso.net>
To: Giuseppe Cavallaro <peppe.cavallaro@...com>
Cc: netdev@...r.kernel.org,
Gabriel Fernandez <gabriel.fernandez@...aro.org>,
Andreas Färber <afaerber@...e.de>,
Frank Schäfer <fschaefer.oss@...glemail.com>,
Dinh Nguyen <dinh.linux@...il.com>,
"David S. Miller" <davem@...emloft.net>, preid@...ctromag.com.au,
Fabrice GASNIER <fabrice.gasnier@...com>,
Alexandre TORGUE <alexandre.torgue@...com>
Subject: Re: [PATCH (net-next.git)] stmmac: fix TX normal DESC
On 16 March 2016 at 11:21, Giuseppe Cavallaro <peppe.cavallaro@...com> wrote:
> This patch fixs a regression raised when test on chips that use
> the normal descriptor layout. In fact, no len bits were set for
> the TDES1 and no OWN bit inside the TDES0.
>
> Signed-off-by: Giuseppe CAVALLARO <peppe.cavallaro@...com>
> Tested-by: Andreas Färber <afaerber@...e.de>
> Cc: Fabrice Gasnier <fabrice.gasnier@...com>
Hi,
with this patch, I have eth working reliably on the Rock2 again.
Tested-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
Thanks,
Tomeu
> ---
> drivers/net/ethernet/stmicro/stmmac/norm_desc.c | 16 ++++++++--------
> 1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
> index e13228f..011386f 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
> @@ -199,11 +199,6 @@ static void ndesc_prepare_tx_desc(struct dma_desc *p, int is_fs, int len,
> {
> unsigned int tdes1 = p->des1;
>
> - if (mode == STMMAC_CHAIN_MODE)
> - norm_set_tx_desc_len_on_chain(p, len);
> - else
> - norm_set_tx_desc_len_on_ring(p, len);
> -
> if (is_fs)
> tdes1 |= TDES1_FIRST_SEGMENT;
> else
> @@ -217,10 +212,15 @@ static void ndesc_prepare_tx_desc(struct dma_desc *p, int is_fs, int len,
> if (ls)
> tdes1 |= TDES1_LAST_SEGMENT;
>
> - if (tx_own)
> - tdes1 |= TDES0_OWN;
> -
> p->des1 = tdes1;
> +
> + if (mode == STMMAC_CHAIN_MODE)
> + norm_set_tx_desc_len_on_chain(p, len);
> + else
> + norm_set_tx_desc_len_on_ring(p, len);
> +
> + if (tx_own)
> + p->des0 |= TDES0_OWN;
> }
>
> static void ndesc_set_tx_ic(struct dma_desc *p)
> --
> 1.7.4.4
>
Powered by blists - more mailing lists