Hi,

Às 12:57 PM de 12/14/2016, Pavel Machek escreveu:
> Hi!
> 
>> So if there is a long time before handling interrupts,
>> I guess that it makes sense that one stream could
>> get an advantage in the net scheduler.
>>
>> If I find the time, and if no one beats me to it, I will try to replace
>> the normal timers with HR timers + a smaller default timeout.
>>
> 
> Can you try something like this? Highres timers will be needed, too,
> but this fixes the logic problem.
> 
> You'll need to apply it twice as code is copy&pasted.
> 
> Best regards,
>                                                                       Pavel
> 
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> 
>        */
>       priv->tx_count_frames += nfrags + 1;
>       if (likely(priv->tx_coal_frames > priv->tx_count_frames)) {
> -             mod_timer(&priv->txtimer,
> -                       STMMAC_COAL_TIMER(priv->tx_coal_timer));
> +             if (priv->tx_count_frames == nfrags + 1)
> +                     mod_timer(&priv->txtimer,
> +                               STMMAC_COAL_TIMER(priv->tx_coal_timer));
>       } else {
>               priv->tx_count_frames = 0;
>               priv->hw->desc->set_tx_ic(desc);
> 
> 

I know that this is completely of topic, but I am facing a dificulty with
stmmac. I have interrupts, mac well configured rx packets being received
successfully, but TX is not working, resulting in Tx errors = Total TX packets.
I have made a lot of debug and my conclusions is that by some reason when using
stmmac after starting tx dma, the hw state machine enters a deadend state
resulting in those errors. Anyone faced this trouble?

Thanks.

Reply via email to