From: Pavel Machek <pavel@ucw.cz>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: Francois Romieu <romieu@fr.zoreil.com>,
bh74.an@samsung.com, ks.giri@samsung.com,
vipul.pandya@samsung.com, peppe.cavallaro@st.com,
alexandre.torgue@st.com, davem@davemloft.net,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] net: ethernet: sxgbe: remove private tx queue lock
Date: Thu, 15 Dec 2016 22:03:24 +0100 [thread overview]
Message-ID: <20161215210324.GA13878@amd> (raw)
In-Reply-To: <cfad6b84-de23-2e03-6d34-2b3451975179@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
Hi!
> sorry for the late reply.
No problem. Thanks for the help.
> On 11.12.2016 21:11, Pavel Machek wrote:
> >
> > Do you understand what stmmac_tx_err(priv); is supposed to do? In
> > particular, if it is called while the driver is working ok -- should
> > the driver survive that?
>
> As far as I understood it is supposed to fixup an errorneous tx path, e.g. a
> missing tx completion for transmitted frames.
>
> Some drivers do this by restarting only the HW parts responsible for tx, some
> others by restarting the complete hardware.
> But IMO it should also be ok to be called if the HW is still working fine.
>
> > Because it does not currently, and I don't know how to test that
> > code. Unplugging the cable does not provoke that.
> >
> > I tried
> >
> > } else if (unlikely(status == tx_hard_error))
> > stmmac_tx_err(priv);
> > +
> > + {
> > + static int i;
> > + i++;
> > + if (i==1000) {
> > + i = 0;
> > + printk("Simulated error\n");
> > + stmmac_tx_err(priv);
> > + }
> > + }
> > }
> >
>
> Ok, there is this race that Francois mentioned so it is not surprising that
> the driver does not survive the call of stmmac_tx_err() as it is called now.
> Thats why I suggested to do a proper shutdown and restart of the tx path to
> avoid the race.
I actually did experiment with adding locking there, too, and no, no
luck. It seems stmmac_tx_err() is more broken than just locking.
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 --]
next prev parent reply other threads:[~2016-12-15 21:13 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 20:05 Remove private locks to avoid possible deadlock Lino Sanfilippo
2016-12-07 20:05 ` [PATCH 1/2] net: ethernet: sxgbe: remove private tx queue lock Lino Sanfilippo
2016-12-07 23:15 ` Francois Romieu
2016-12-08 20:32 ` Lino Sanfilippo
2016-12-08 21:54 ` Pavel Machek
2016-12-08 22:12 ` Lino Sanfilippo
2016-12-08 22:18 ` Pavel Machek
2016-12-08 22:45 ` Lino Sanfilippo
2016-12-08 23:19 ` Francois Romieu
2016-12-09 11:21 ` Pavel Machek
2016-12-10 2:25 ` Lino Sanfilippo
2016-12-11 20:11 ` Pavel Machek
2016-12-15 19:27 ` Lino Sanfilippo
2016-12-15 21:03 ` Pavel Machek [this message]
2016-12-15 21:32 ` Lino Sanfilippo
2016-12-15 22:33 ` Lino Sanfilippo
2016-12-17 17:31 ` Pavel Machek
2016-12-18 0:15 ` Francois Romieu
2016-12-18 16:15 ` Lino Sanfilippo
2016-12-18 17:23 ` Pavel Machek
2016-12-18 18:30 ` Pavel Machek
2016-12-19 22:49 ` Lino Sanfilippo
2016-12-18 20:16 ` Pavel Machek
2016-12-19 10:02 ` Pavel Machek
2016-12-20 0:05 ` Francois Romieu
2016-12-07 20:05 ` [PATCH 2/2] net: ethernet: stmmac: " Lino Sanfilippo
2016-12-07 20:55 ` Pavel Machek
2016-12-07 20:59 ` Pavel Machek
2016-12-07 21:37 ` Pavel Machek
2016-12-07 21:43 ` Lino Sanfilippo
2016-12-07 22:34 ` Lino Sanfilippo
2016-12-07 23:21 ` Pavel Machek
2016-12-07 23:41 ` David Miller
2016-12-08 14:08 ` Pavel Machek
2016-12-08 15:26 ` David Miller
2016-12-08 15:46 ` Pavel Machek
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=20161215210324.GA13878@amd \
--to=pavel@ucw.cz \
--cc=LinoSanfilippo@gmx.de \
--cc=alexandre.torgue@st.com \
--cc=bh74.an@samsung.com \
--cc=davem@davemloft.net \
--cc=ks.giri@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=romieu@fr.zoreil.com \
--cc=vipul.pandya@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.