[Cbe-oss-dev] [PATCH] ps3: fix return value in the case of tx error

Stephen Hemminger shemminger at linux-foundation.org
Fri Jul 13 05:27:12 EST 2007


On Thu, 12 Jul 2007 15:59:26 +0900
Masakazu Mokuno <mokuno at sm.sony.co.jp> wrote:

> 	Hi
> 	
> This patch fixes the improper return value of the hard_start_xmit()
> handler of PS3 gelic network driver.
> 
> Signed-off-by: Masakazu Mokuno <mokuno at sm.sony.co.jp>
> ---
>  drivers/net/ps3_gelic_net.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/net/ps3_gelic_net.c
> +++ b/drivers/net/ps3_gelic_net.c
> @@ -803,7 +803,7 @@ kick:
>  error:
>  	card->netdev_stats.tx_dropped++;
>  	spin_unlock_irqrestore(&card->tx_dma_lock, flags);
> -	return NETDEV_TX_LOCKED;
> +	return NETDEV_TX_BUSY;
>  }
>  

Wrong again. In case of error the device should free the skb
and return NETDEV_TX_OK. When you return NETDEV_TX_BUSY the
assumption is that send will be requeued. Chances are that what
ever caused the skb not to usable will continue.

-- 
Stephen Hemminger <shemminger at linux-foundation.org>



More information about the cbe-oss-dev mailing list