Subject: Re: [PATCH v4] bfin_mac: convert bfin Ethernet driver to NAPI framework

From: Varka Bhadram <[email-masked]>
Date: Tue, 15 Jul 2014 14:24:13 +0530

On 07/15/2014 02:13 PM, Sonic Zhang wrote:
> From: Sonic Zhang <[email-masked]>
>
> Ethernet RX DMA buffers are polled in NAPI work queue other than received
> directly in DMA RX interrupt handler.
>
> Signed-off-by: Sonic Zhang <[email-masked]>
>
> ---
> v2-changes:
> - avoid test NAPI_STATE_NPSVC bit in net device driver
>
> v3-changes:
> - use tabs while indenting the code
>
> v4-changes:
> - unconditionally compete the NAPI poll and re-enable the MAC_RX IRQ
>
> Signed-off-by: Sonic Zhang <[email-masked]>
> ---
>   drivers/net/ethernet/adi/bfin_mac.c | 79 +++++++++++++++++++++++--------------
>   drivers/net/ethernet/adi/bfin_mac.h |  1 +
>   2 files changed, 50 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
> index 7ae74d4..b838e81 100644
> --- a/drivers/net/ethernet/adi/bfin_mac.c
> +++ b/drivers/net/ethernet/adi/bfin_mac.c
> @@ -1218,11 +1218,13 @@ out:
>   #define RX_ERROR_MASK (RX_LONG | RX_ALIGN | RX_CRC | RX_LEN | \
>   	RX_FRAG | RX_ADDR | RX_DMAO | RX_PHY | RX_LATE | RX_RANGE)
>   
> -static void bfin_mac_rx(struct net_device *dev)
> +static void bfin_mac_rx(struct napi_struct *napi, int budget)
>   {
> +	struct bfin_mac_local *lp = container_of(napi,
> +				struct bfin_mac_local, napi);

should match open parenthesis

struct bfin_mac_local *lp = container_of(napi,
					 struct bfin_mac_local,
					 napi);

> +	struct net_device *dev = lp->ndev;
>   	

-- 
Regards,
Varka Bhadram.