From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Fabio Estevam <fabio.estevam@freescale.com>,
Frank Li <Frank.Li@freescale.com>,
Shawn Guo <shawn.guo@linaro.org>,
kernel@pengutronix.de, Hector Palacios <hector.palacios@digi.com>,
Tim Sander <tim.sander@hbm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Hemminger <stephen@networkplumber.org>,
Duan Fugang-B38611 <B38611@freescale.com>,
Florian Fainelli <florian@openwrt.org>,
Ben Hutchings <bhutchings@solarflare.com>
Subject: [PATCH] net/fec: Don't let ndo_start_xmit return NETDEV_TX_BUSY without link
Date: Tue, 30 Jul 2013 11:29:40 +0200 [thread overview]
Message-ID: <1375176580-7368-1-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <1374758875-7926-1-git-send-email-u.kleine-koenig@pengutronix.de>
Don't test for having link and let hardware deal with this situation.
Without this patch I see a machine running an -rt patched Linux being
stuck in sch_direct_xmit when it looses link while there is still a
packet to be sent. In this case the fec_enet_start_xmit routine returned
NETDEV_TX_BUSY which makes the network stack reschedule the packet and
so sch_direct_xmit calls fec_enet_start_xmit again.
I failed to reproduce a complete hang without -rt, but I think the
problem exists there, too.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,
this is a new variant of "[PATCH] net/fec: call netif_carrier_off when
not having link" that drops calling netif_carrier_{on,off} in
fec_restart because the phy library already handles that.
I think this is 3.11 material assuming you are ok with the patch now.
Best regards
Uwe
drivers/net/ethernet/freescale/fec_main.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index ed61160..792d729 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -280,11 +280,6 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
unsigned short status;
unsigned int index;
- if (!fep->link) {
- /* Link is down or auto-negotiation is in progress. */
- return NETDEV_TX_BUSY;
- }
-
/* Fill in a Tx ring entry */
bdp = fep->cur_tx;
--
1.8.3.2
next prev parent reply other threads:[~2013-07-30 9:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 13:27 [PATCH] net/fec: call netif_carrier_off when not having link Uwe Kleine-König
2013-07-25 16:03 ` Stephen Hemminger
2013-07-26 9:35 ` Duan Fugang-B38611
2013-07-26 10:06 ` Florian Fainelli
2013-07-26 10:52 ` Sascha Hauer
2013-07-26 15:31 ` Ben Hutchings
2013-07-29 2:10 ` Duan Fugang-B38611
2013-07-29 2:14 ` Duan Fugang-B38611
2013-07-30 9:29 ` Uwe Kleine-König [this message]
2013-07-30 9:59 ` [PATCH] net/fec: Don't let ndo_start_xmit return NETDEV_TX_BUSY without link Duan Fugang-B38611
2013-07-30 23:05 ` David Miller
2013-07-31 8:16 ` Uwe Kleine-König
2013-07-31 18:51 ` David Miller
2013-08-01 2:01 ` Duan Fugang-B38611
2013-08-01 2:25 ` Steven Rostedt
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=1375176580-7368-1-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=B38611@freescale.com \
--cc=Frank.Li@freescale.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=fabio.estevam@freescale.com \
--cc=florian@openwrt.org \
--cc=hector.palacios@digi.com \
--cc=kernel@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=shawn.guo@linaro.org \
--cc=stephen@networkplumber.org \
--cc=tglx@linutronix.de \
--cc=tim.sander@hbm.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).