From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Wu Jiajun-B06378 <B06378@freescale.com>
Cc: linuxppc-dev@ozlabs.org, lsorense@csclub.uwaterloo.ca,
davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 1/3] ucc_geth: Fix empty TX queue processing
Date: Mon, 11 Jan 2010 13:52:48 +0300 [thread overview]
Message-ID: <20100111105248.GA28580@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <100CB1A1877FF245BDB7AF83A0E73FFE26BE4D@zch01exm28.fsl.freescale.net>
On Mon, Jan 11, 2010 at 11:47:37AM +0800, Wu Jiajun-B06378 wrote:
>
> 'bd == ugeth->txBd[txQ]' has two possible statuses: 1)full queue.
> 2)empty queue.
> Removing 'netif_queue_stopped() == 0' will make transmitting stopping
> when the queue is full.
>
> I made a new patch for this oops.
[...]
> + if ((bd == ugeth->txBd[txQ]) && (skb == NULL))
> break;
Hm. I wonder why do we need the 'bd == ugeth->txBd[txQ]' check
at all? The null skb will cause a kernel oops anyway.
I think the patch below should be sufficient for the fix.
Can you try it? Or if you tell me how to reproduce the issue
you observe, I can try it myself.
Thanks a lot!
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 41ad2f3..a1a6d06 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3279,13 +3279,12 @@ 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]) /* queue empty? */
+ skb = ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]];
+ if (!skb)
break;
dev->stats.tx_packets++;
- skb = ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]];
-
if (skb_queue_len(&ugeth->rx_recycle) < RX_BD_RING_LEN &&
skb_recycle_check(skb,
ugeth->ug_info->uf_info.max_rx_buf_length +
WARNING: multiple messages have this Message-ID (diff)
From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Wu Jiajun-B06378 <B06378@freescale.com>
Cc: linuxppc-dev@ozlabs.org, netdev@vger.kernel.org,
lsorense@csclub.uwaterloo.ca, davem@davemloft.net
Subject: Re: [PATCH 1/3] ucc_geth: Fix empty TX queue processing
Date: Mon, 11 Jan 2010 13:52:48 +0300 [thread overview]
Message-ID: <20100111105248.GA28580@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <100CB1A1877FF245BDB7AF83A0E73FFE26BE4D@zch01exm28.fsl.freescale.net>
On Mon, Jan 11, 2010 at 11:47:37AM +0800, Wu Jiajun-B06378 wrote:
>
> 'bd == ugeth->txBd[txQ]' has two possible statuses: 1)full queue.
> 2)empty queue.
> Removing 'netif_queue_stopped() == 0' will make transmitting stopping
> when the queue is full.
>
> I made a new patch for this oops.
[...]
> + if ((bd == ugeth->txBd[txQ]) && (skb == NULL))
> break;
Hm. I wonder why do we need the 'bd == ugeth->txBd[txQ]' check
at all? The null skb will cause a kernel oops anyway.
I think the patch below should be sufficient for the fix.
Can you try it? Or if you tell me how to reproduce the issue
you observe, I can try it myself.
Thanks a lot!
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 41ad2f3..a1a6d06 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3279,13 +3279,12 @@ 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]) /* queue empty? */
+ skb = ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]];
+ if (!skb)
break;
dev->stats.tx_packets++;
- skb = ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]];
-
if (skb_queue_len(&ugeth->rx_recycle) < RX_BD_RING_LEN &&
skb_recycle_check(skb,
ugeth->ug_info->uf_info.max_rx_buf_length +
next prev parent reply other threads:[~2010-01-11 10:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 3:47 ` Wu Jiajun-B06378
2010-01-11 10:52 ` Anton Vorontsov [this message]
2010-01-11 10:52 ` Anton Vorontsov
2010-01-11 11:52 ` Wu Jiajun-B06378
2010-01-11 11:52 ` Wu Jiajun-B06378
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
-- strict thread matches above, loose matches on Subject: below --
2009-12-24 15:30 [PATCH 0/3] ucc_geth: Some more fixes Anton Vorontsov
2009-12-24 15:31 ` [PATCH 1/3] ucc_geth: Fix empty TX queue processing Anton Vorontsov
2009-12-24 15:31 ` Anton Vorontsov
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=20100111105248.GA28580@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=B06378@freescale.com \
--cc=davem@davemloft.net \
--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 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.