From: Manish Lachwani <mlachwani@mvista.com>
To: Thomas Petazzoni <thomas.petazzoni@enix.org>
Cc: linux-mips@linux-mips.org
Subject: Re: Error on TX descriptor free
Date: Fri, 22 Oct 2004 09:58:57 -0700 [thread overview]
Message-ID: <41793C51.40602@mvista.com> (raw)
In-Reply-To: <417907A2.3030000@enix.org>
Hello Thomas
Thats a bug. I dont have a board to try this on. But, can you?
Thomas Petazzoni wrote:
> Hello,
>
> I'm currently using the MV643xx Ethernet driver on my board. When I run
> the command :
>
> # ifconfig eth0 down
>
> I see the following message :
>
> eth0: Error on Tx descriptor free - could not free 1 descriptors
>
> I went through the code, and saw that this message is displayed in
> mv64340_eth_free_tx_rings(). This function frees all remaining skbs
> (registered in the mp->tx_skb array), and decrement mp->tx_ring_skbs.
> Then, it checks if it reached 0. In my case, it is still 1.
>
> In fact, mp->tx_ring_skbs is initialized to 0 and then incremented in
> mv64340_eth_start_xmit() (when a transmission starts), and is
> decremented in mv64340_eth_free_tx_queue (when the transmission is
> done). But the decrementation only occurs if mp->tx_ring_skbs is
> different from one. I don't understand why.
>
> At the end of mv64340_eth_free_tx_queue(), the following code makes sure
> that the number of skbs did not reach 0 :
>
> if (mp->tx_ring_skbs == 0)
> panic("ERROR - TX outstanding SKBs counter is corrupted");
>
> Well, my question is simply : why can't we decrement the
> mp->tx_ring_skbs counter to 0 ?
>
> What needs to be fixed ? The decrementation of the counter, or the
> function that frees the TX queue when the interface is stopped ?
Decrement the counter to zero as you suggested. And remove the
panic("..") in mv64340_eth_free_tx_queue(). Let me know if it works fine
Thanks
Manish Lachwani
>
> I've seen similar code in the Titan GE driver.
>
> Do not hesitate to ask for further details,
>
> Thanks,
>
> Thomas
prev parent reply other threads:[~2004-10-22 16:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 13:14 Error on TX descriptor free Thomas Petazzoni
2004-10-22 16:58 ` Manish Lachwani [this message]
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=41793C51.40602@mvista.com \
--to=mlachwani@mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=thomas.petazzoni@enix.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