[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <513F8660.2010602@ti.com>
Date: Wed, 13 Mar 2013 01:17:44 +0530
From: Mugunthan V N <mugunthanvnm@...com>
To: Daniel Mack <zonque@...il.com>
CC: <netdev@...r.kernel.org>, <andreas.fenkart@...eamunlimited.com>,
<davem@...emloft.net>, <s.neumann@...mfeld.com>,
<koen@...inion.thruhere.net>
Subject: Re: [PATCH] net: ethernet: cpsw: fix usage of cpdma_check_free_tx_desc()
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@...il.com>
> Cc: Mugunthan V N <mugunthanvnm@...com>
> Reported-by: Sven Neumann <s.neumann@...mfeld.com>
> Reported-by: Andreas Fenkart <andreas.fenkart@...eamunlimited.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@...com>
Acked-by: Mugunthan V N <mugunthanvnm@...com>
Regards
Mugunthan V N
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists