From: "Tim Sander" <tim.sander@hbm.com>
To: "Hector Palacios" <hector.palacios@digi.com>
Cc: <linux-rt-users@vger.kernel.org>, <lclaudio@uudg.org>,
<rostedt@goodmis.org>, <efault@gmx.de>
Subject: Re: infinite spin in RT when booting with DHCP on
Date: Thu, 2 Feb 2012 16:32:49 +0100 [thread overview]
Message-ID: <201202021632.50065.tim.sander@hbm.com> (raw)
In-Reply-To: <201202021525.05606.tim.sander@hbm.com>
Hi
Attached you will find a hacky patch which should just verify that the problem
hypothesis can be validated.
It just initializes the phy with driver initialisation and should work around
this ksoftirq/sirq-net-tx problem.
Best regards
Tim
From 5dda8d2f7d068ca2534441215d9437f3bbb0c652 Mon Sep 17 00:00:00 2001
Hottinger Baldwin Messtechnik GmbH, Im Tiefen See 45, 64293 Darmstadt, Germany | www.hbm.com
Registered as GmbH (German limited liability corporation) in the commercial register at the local court of Darmstadt, HRB 1147
Company domiciled in Darmstadt | CEO: Andreas Huellhorst | Chairman of the board: James Charles Webster
Als Gesellschaft mit beschraenkter Haftung eingetragen im Handelsregister des Amtsgerichts Darmstadt unter HRB 1147
Sitz der Gesellschaft: Darmstadt | Geschaeftsfuehrung: Andreas Huellhorst | Aufsichtsratsvorsitzender: James Charles Webster
The information in this email is confidential. It is intended solely for the addressee. If you are not the intended recipient, please let me know and delete this email.
Die in dieser E-Mail enthaltene Information ist vertraulich und lediglich für den Empfaenger bestimmt. Sollten Sie nicht der eigentliche Empfaenger sein, informieren Sie mich bitte kurz und loeschen diese E-Mail.
From: Tim Sander <tim.sander@hbm.com>
Date: Thu, 2 Feb 2012 15:51:06 +0100
Subject: [PATCH] fec: hack around ksoftirqd problem
---
drivers/net/fec.c | 58 ++++++++++++++++++++++++++++------------------------
1 files changed, 31 insertions(+), 27 deletions(-)
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 885d8ba..292ae7e 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -231,6 +231,7 @@ static void *swap_buffer(void *bufaddr, int len)
return bufaddr;
}
+
static netdev_tx_t
fec_enet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{
@@ -1135,24 +1136,6 @@ static int
fec_enet_open(struct net_device *ndev)
{
struct fec_enet_private *fep = netdev_priv(ndev);
- int ret;
-
- /* I should reset the ring buffers here, but I don't yet know
- * a simple way to do that.
- */
-
- ret = fec_enet_alloc_buffers(ndev);
- if (ret)
- return ret;
-
- /* Probe and connect to PHY when open the interface */
- ret = fec_enet_mii_probe(ndev);
- if (ret) {
- fec_enet_free_buffers(ndev);
- return ret;
- }
- phy_start(fep->phy_dev);
- netif_start_queue(ndev);
fep->opened = 1;
return 0;
}
@@ -1164,15 +1147,6 @@ fec_enet_close(struct net_device *ndev)
/* Don't know what to do yet. */
fep->opened = 0;
- netif_stop_queue(ndev);
- fec_stop(ndev);
-
- if (fep->phy_dev) {
- phy_stop(fep->phy_dev);
- phy_disconnect(fep->phy_dev);
- }
-
- fec_enet_free_buffers(ndev);
return 0;
}
@@ -1432,10 +1406,32 @@ fec_probe(struct platform_device *pdev)
netif_carrier_off(ndev);
ret = register_netdev(ndev);
+
if (ret)
goto failed_register;
+// Tim: very hacky for testing
+ /* I should reset the ring buffers here, but I don't yet know
+ * a simple way to do that.
+ */
+
+ ret = fec_enet_alloc_buffers(ndev);
+ if (ret)
+ return ret;
+
+ /* Probe and connect to PHY when open the interface */
+ ret = fec_enet_mii_probe(ndev);
+ if (ret) {
+ fec_enet_free_buffers(ndev);
+ return ret;
+ }
+ phy_start(fep->phy_dev);
+ netif_start_queue(ndev);
+ fep->opened = 1;
+// end hacky
+
return 0;
+
failed_register:
fec_enet_mii_remove(fep);
@@ -1466,7 +1462,15 @@ fec_drv_remove(struct platform_device *pdev)
struct fec_enet_private *fep = netdev_priv(ndev);
struct resource *r;
+ netif_stop_queue(ndev);
fec_stop(ndev);
+
+ if (fep->phy_dev) {
+ phy_stop(fep->phy_dev);
+ phy_disconnect(fep->phy_dev);
+ }
+
+ fec_enet_free_buffers(ndev);
fec_enet_mii_remove(fep);
clk_disable(fep->clk);
clk_put(fep->clk);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-02-02 15:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 12:28 infinite spin in RT when booting with DHCP on Hector Palacios
2012-02-02 12:38 ` Tim Sander
2012-02-02 12:57 ` Hector Palacios
2012-02-02 14:25 ` Tim Sander
2012-02-02 15:32 ` Tim Sander [this message]
2012-02-02 15:53 ` Hector Palacios
2012-02-02 18:10 ` Steven Rostedt
2012-02-03 10:09 ` Hector Palacios
2012-02-03 10:54 ` John Ogness
2012-02-03 14:26 ` Steven Rostedt
2012-02-02 17:33 ` Steven Rostedt
2012-02-02 18:21 ` Steven Rostedt
2012-02-02 20:13 ` Uwe Kleine-König
2012-02-02 21:34 ` Steven Rostedt
2012-02-02 23:44 ` Tim Sander
2012-02-03 9:45 ` Tim Sander
2012-02-06 14:49 ` Tim Sander
2012-02-03 10:23 ` Hector Palacios
2012-02-03 10:35 ` Uwe Kleine-König
2012-02-03 16:14 ` Hector Palacios
2012-02-03 16:43 ` Steven Rostedt
2012-02-03 17:25 ` Hector Palacios
2012-02-03 17:39 ` Steven Rostedt
2012-02-03 19:25 ` Uwe Kleine-König
2012-02-03 20:04 ` Steven Rostedt
2012-02-06 8:51 ` Hector Palacios
2012-02-06 13:27 ` Steven Rostedt
2012-02-08 20:41 ` Thomas Gleixner
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=201202021632.50065.tim.sander@hbm.com \
--to=tim.sander@hbm.com \
--cc=efault@gmx.de \
--cc=hector.palacios@digi.com \
--cc=lclaudio@uudg.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
/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.