From: Mugunthan V N <mugunthanvnm@ti.com>
To: Daniel Mack <zonque@gmail.com>
Cc: <netdev@vger.kernel.org>, <andreas.fenkart@streamunlimited.com>,
<davem@davemloft.net>, <s.neumann@raumfeld.com>,
<koen@dominion.thruhere.net>
Subject: Re: [PATCH] net: ethernet: cpsw: fix usage of cpdma_check_free_tx_desc()
Date: Wed, 13 Mar 2013 01:17:44 +0530 [thread overview]
Message-ID: <513F8660.2010602@ti.com> (raw)
In-Reply-To: <1363105879-26921-1-git-send-email-zonque@gmail.com>
On 3/12/2013 10:01 PM, Daniel Mack wrote:
> Commit fae50823d0 ("net: ethernet: davinci_cpdma: Add boundary for rx
> and tx descriptors") introduced a function to check the current
> allocation state of tx packets. The return value is taken into account
> to stop the netqork queue on the adapter in case there are no free
> slots.
>
> However, cpdma_check_free_tx_desc() returns 'true' if there is room in
> the bitmap, not 'false', so the usage of the function is wrong.
>
> Signed-off-by: Daniel Mack <zonque@gmail.com>
> Cc: Mugunthan V N <mugunthanvnm@ti.com>
> Reported-by: Sven Neumann <s.neumann@raumfeld.com>
> Reported-by: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
> ---
> drivers/net/ethernet/ti/cpsw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index 01ffbc4..75c4855 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -905,7 +905,7 @@ static netdev_tx_t cpsw_ndo_start_xmit(struct sk_buff *skb,
> /* If there is no more tx desc left free then we need to
> * tell the kernel to stop sending us tx frames.
> */
> - if (unlikely(cpdma_check_free_tx_desc(priv->txch)))
> + if (unlikely(!cpdma_check_free_tx_desc(priv->txch)))
> netif_stop_queue(ndev);
>
> return NETDEV_TX_OK;
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Regards
Mugunthan V N
next prev parent reply other threads:[~2013-03-12 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 16:31 [PATCH] net: ethernet: cpsw: fix usage of cpdma_check_free_tx_desc() Daniel Mack
2013-03-12 19:47 ` Mugunthan V N [this message]
2013-03-12 20:20 ` Andreas Fenkart
2013-03-13 8:51 ` David Miller
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=513F8660.2010602@ti.com \
--to=mugunthanvnm@ti.com \
--cc=andreas.fenkart@streamunlimited.com \
--cc=davem@davemloft.net \
--cc=koen@dominion.thruhere.net \
--cc=netdev@vger.kernel.org \
--cc=s.neumann@raumfeld.com \
--cc=zonque@gmail.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).