From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: David Miller <davem@davemloft.net>
Cc: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>,
Li Yang <leoli@freescale.com>,
netdev@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: [PATCH 1/3] ucc_geth: Fix empty TX queue processing
Date: Thu, 24 Dec 2009 18:31:03 +0300 [thread overview]
Message-ID: <20091224153103.GA1206@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20091224153034.GA32535@oksana.dev.rtsoft.ru>
Following oops was seen with the ucc_geth driver:
Unable to handle kernel paging request for data at address 0x00000058
Faulting instruction address: 0xc024f2fc
Oops: Kernel access of bad area, sig: 11 [#1]
[...]
NIP [c024f2fc] skb_recycle_check+0x14/0x100
LR [e30aa0a4] ucc_geth_poll+0xd8/0x4e0 [ucc_geth_driver]
Call Trace:
[df857d50] [c000b03c] __ipipe_grab_irq+0x3c/0xa4 (unreliable)
[df857d60] [e30aa0a4] ucc_geth_poll+0xd8/0x4e0 [ucc_geth_driver]
[df857dd0] [c0258cf8] net_rx_action+0xf8/0x1b8
[df857e10] [c0032a38] __do_softirq+0xb8/0x13c
[df857e60] [c00065cc] do_softirq+0xa0/0xac
[...]
This is because ucc_geth_tx() tries to process an empty queue when
queues are logically stopped. Stopping the queues doesn't disable
polling, and since nowadays ucc_geth_tx() is actually called from
the polling routine, the oops above might pop up.
Fix this by removing 'netif_queue_stopped() == 0' check.
Reported-by: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Tested-by: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: Stable <stable@vger.kernel.org> [2.6.32]
---
drivers/net/ucc_geth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index afaf088..0f8c99e 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3273,7 +3273,7 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ)
/* Handle the transmitted buffer and release */
/* the BD to be used with the current frame */
- if ((bd == ugeth->txBd[txQ]) && (netif_queue_stopped(dev) == 0))
+ if (bd == ugeth->txBd[txQ]) /* queue empty? */
break;
dev->stats.tx_packets++;
--
1.6.3.3
next prev parent reply other threads:[~2009-12-24 15:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-24 15:30 [PATCH 0/3] ucc_geth: Some more fixes Anton Vorontsov
2009-12-24 15:31 ` Anton Vorontsov [this message]
2009-12-24 15:31 ` [PATCH 2/3] ucc_geth: Fix netdev watchdog triggering on link changes Anton Vorontsov
2009-12-24 15:31 ` [PATCH 3/3] ucc_geth: Don't needlessly change MAC settings in adjust_link() Anton Vorontsov
2009-12-27 4:25 ` [PATCH 0/3] ucc_geth: Some more fixes David Miller
[not found] <0A1FE637C2C7E148B9573BB60CC630E56C3E90@zch01exm26.fsl.freescale.net>
2010-01-11 3:47 ` [PATCH 1/3] ucc_geth: Fix empty TX queue processing Wu Jiajun-B06378
2010-01-11 10:52 ` Anton Vorontsov
2010-01-11 11:52 ` Wu Jiajun-B06378
-- strict thread matches above, loose matches on Subject: below --
2010-06-22 13:02 [stable] Please apply ucc_geth driver fixes to 2.6.32-stable Petri Lehtinen
2010-06-22 13:02 ` [PATCH 1/3] ucc_geth: Fix empty TX queue processing Petri Lehtinen
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=20091224153103.GA1206@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=davem@davemloft.net \
--cc=leoli@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=lsorense@csclub.uwaterloo.ca \
--cc=netdev@vger.kernel.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 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).