netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Niklas Cassel <niklas.cassel@axis.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Lars Persson <larper@axis.com>, netdev <netdev@vger.kernel.org>
Subject: Re: stmmac tx timeout
Date: Tue, 13 Jun 2017 10:38:52 +0200	[thread overview]
Message-ID: <20170613083852.GA17031@amd> (raw)
In-Reply-To: <9f7d2198-073f-435c-fd9a-f25889968b9d@axis.com>

[-- Attachment #1: Type: text/plain, Size: 1408 bytes --]

Hi!

> > @@ -2043,7 +2063,11 @@ static netdev_tx_t stmmac_xmit(struct sk_buff
> > *skb, stru\
> > ct net_device *dev)
> >         } else
> > 	                priv->tx_count_frames = 0;
> > 
> > +       dma_rmb();
> > +       dma_wmb();
> >         /* To avoid raise condition */
> > +       BUG_ON(first->des01.etx.own); /* This BUG_ON seems to be enough.
> > +                                          Replacing it with barriers is _not_enough. */
> >         priv->hw->desc->set_tx_owner(first);
> >  	wmb();
> > 
> > No, the BUG_ON() does not trigger. Yes, it still fixes the driver for
> > me. You may want to verify it has same effect for you.
> 
> Hello Pavel,
> 
> I am sincerely grateful for you help.
> 
> I forward ported your patch to 4.9,
> however, I could still get tx timeouts.
> 
> Thankfully I finally found the root cause of
> my tx timeouts, see the patch I've submitted
> here:
> 
> http://marc.info/?l=linux-kernel&m=149673393525236

Thanks a lot for the information. And unfortunately yes, there's
probably more work to do in the stmmac driver; for example it would be
good if _tx_timeout were actually able to recover the card. I probably
have patch for that somewhere, too...

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      reply	other threads:[~2017-06-13  8:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 12:06 stmmac tx timeout Niklas Cassel
2017-05-23 13:39 ` Pavel Machek
2017-06-06 10:45   ` Niklas Cassel
2017-06-13  8:38     ` Pavel Machek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170613083852.GA17031@amd \
    --to=pavel@ucw.cz \
    --cc=Joao.Pinto@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=larper@axis.com \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.cassel@axis.com \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).