[PATCH 1/1 net-next] fec: net: put tx to napi poll function to fix dead lock

Frank Li lznuaa at gmail.com
Thu Feb 28 22:05:57 EST 2013


2013/3/1 David Miller <davem at davemloft.net>:
> From: Frank Li <Frank.Li at freescale.com>
> Date: Thu, 28 Feb 2013 11:44:20 +0800
>
>> +     int tx_pkts = fec_enet_tx(ndev);
>> +
>> +     if (tx_pkts)
>> +             return budget;
>
> This isn't right, you don't want to finish the NAPI poll because
> TX work was done.
>
> Ignore the TX work for poll completion purposes, see
> drivers/net/ethernet/broadcom/tg3.c:tg3_poll_work() for
> example.

I read tg3.c code. If I understand correct,
just need remove below line

    if (tx_pkts)
             return budget;

Is it ture?



More information about the linux-arm-kernel mailing list