Subject: Re: [PATCH] [v7] net: emac: emac gigabit ethernet controller driver

From: Timur Tabi <[email-masked]>
Date: Thu, 11 Aug 2016 11:03:17 -0500

Timur Tabi wrote:
>
>>
>> The hang occurs with this loop in napi_disable():
>>
>>      while (test_and_set_bit(NAPI_STATE_SCHED, &n->state))
>>          msleep(1);
>>
>> This loop never exits.  Can you give me a clue as to what could be the
>> reason?
>
> I figured it out.  I cannot call napi_disable() twice in a row.  It's
> not smart enough to know that NAPI is already disabled.

I realized that I was going about this the wrong way.  Rather than try 
to protect the setting of adpt->rxbuf_size, I instead just calculate 
that value when RX path is configured, which is much cleaner.  This 
ensures that adpt->rxbuf_size is changed only when the interface is down.

-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.